[pcre-dev] [Bug 1295] add 32-bit library

Page principale
Supprimer ce message
Auteur: Philip Hazel
Date:  
À: pcre-dev
Sujet: [pcre-dev] [Bug 1295] add 32-bit library
------- You are receiving this mail because: -------
You are on the CC list for the bug.

http://bugs.exim.org/show_bug.cgi?id=1295




--- Comment #18 from Philip Hazel <ph10@???> 2012-10-17 19:14:47 ---
On Wed, 17 Oct 2012, Christian Persch wrote:

> >   . Signed/unsigned comparisons. I know the source is a complete mess in 
> >     this regard (all my fault for not getting it right at the start) but 
> >     a few casts should fix it.

>
> I think some already pre-existed... I tried compiling with -Wsign-compare
> -Wconversion to find places where 32-bit characters might get mangled, but
> there were simply too many warnings, so I gave up :-) It would be a good idea
> to do a sweep and fix them all...


Yes. I have just fixed some in pcretest, but a sweep would be good.
Sadly, pcretest started life as a hack, and it hasn't got any better. :-(

> >   . C++ style comments: I have avoided using these just in case somebody 
> >     with a non-C++ compiler wants to compile it. (I have no idea, for 
> >     example, if the z/OS compiler recognizes C++ comments.)

>
> I try to avoid them usually; I only use them for 'fixme' style comments I
> intend to remove again. It's possible I forgot some.


No problem! I'll fix some when I see them.

I won't be committing anything more now till Friday at the earliest. I
have fixed problems in pcretest.c and RunTest when just two out of the
three bit sizes are selected (e.g. 8 and 16 but not 32). There were
compile failures in pcretest and RunTest ran the 32-bit tests when it
shouldn't. I've committed the patches. Not quite as tested as I would
like, but I've run out of time now.

In pcretest, I thought for ages about possible ways of making the macros
for PCHARS not have to be separately defined, but I don't think the C
macro language is good enough, so in the end I just duplicated
everything appropriately. The way you had it, it was referencing, for
example, cn32ptr even though 32-bit was not being compiled.

Regards,
Philip


--
Configure bugmail: http://bugs.exim.org/userprefs.cgi?tab=email