Re: stdbool.h with AIX C-compiler

2008-05-17 Thread James Youngman
On Sat, May 17, 2008 at 10:02 AM, James Youngman <[EMAIL PROTECTED]> wrote: > (Note, switched from nug-gnulib to bug-findutils) This time, actually switching (bug-gnulib in BCC)... > > On Wed, May 14, 2008 at 11:57 AM, Heinrich Mislik > <[EMAIL PROTECTED]> wrote: > > [snip: gnulib bug report] > >

Re: stdbool.h with AIX C-compiler

2008-05-17 Thread James Youngman
(Note, switched from nug-gnulib to bug-findutils) On Wed, May 14, 2008 at 11:57 AM, Heinrich Mislik <[EMAIL PROTECTED]> wrote: [snip: gnulib bug report] > I came across this, when the -iregex option of find didn't work > (behaves like -regex). The above test-program reflects the situation > in l

Re: stdbool.h with AIX C-compiler

2008-05-16 Thread Eric Blake
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 [adding bug-findutils] According to James Youngman on 5/16/2008 3:39 PM: | On Fri, May 16, 2008 at 12:19 PM, Heinrich Mislik | <[EMAIL PROTECTED]> wrote: |> After reading the comments in stdbool.h I came to the same conclusion |> and to the same fix.

Re: stdbool.h with AIX C-compiler

2008-05-16 Thread James Youngman
On Fri, May 16, 2008 at 12:19 PM, Heinrich Mislik <[EMAIL PROTECTED]> wrote: > After reading the comments in stdbool.h I came to the same conclusion > and to the same fix. After that -iregex was completly broken. I found > one second place, that needs the same change: Which versions of gnulb are a

Re: stdbool.h with AIX C-compiler

2008-05-16 Thread Bruno Haible
Heinrich Mislik wrote: > Attached find the relevant parts from config.log. Thank you. It shows the known AIX compiler bug that is explicitly tested for in stdbool.m4. So the test is expected to fail. Nothing wrong here. Bruno

Re: stdbool.h with AIX C-compiler

2008-05-16 Thread Heinrich Mislik
On 15 May 2008 at 20:39, Eric Blake wrote: > Heinrich Mislik univie.ac.at> writes: > > Hello Heinrich, and thanks for the report. > > > here is a problem with stdbool.h from gnulib: > > pbool(256); > > Inherently non-portable when attempted with a C89 compiler. And > Gnulib's > replacem

Re: stdbool.h with AIX C-compiler

2008-05-15 Thread Bruno Haible
Hi Eric, I agree with your explanations and patch so far. > maybe it IS worth a change to gnulib's stdbool, to > use 'int' rather than 'signed char' as the replacement, when is > broken, if only so that implicit conversion to bool does not also cause > truncation and thus your observed silent

Re: stdbool.h with AIX C-compiler

2008-05-15 Thread Eric Blake
Heinrich Mislik univie.ac.at> writes: > > # cc bool.c -E > #line 3 "bool.c" > static pbool(_Bool b) As a followup: Obviously, your compiler provides at least some support for _Bool. But it must have failed at least one of the C99 tests for whether its is fully compliant. It would be inter

Re: stdbool.h with AIX C-compiler

2008-05-15 Thread Eric Blake
Eric Blake byu.net> writes: > +2008-05-15 Eric Blake byu.net> > + > + Fix violation of replacement in regex. > + * lib/regcomp.c (re_compile_internal): Avoid implicit cast to bool. > + Reported by Heinrich Mislik univie.ac.at>. regexec.c also needed a similar patch, now pushed.

Re: stdbool.h with AIX C-compiler

2008-05-15 Thread Eric Blake
Heinrich Mislik univie.ac.at> writes: Hello Heinrich, and thanks for the report. > here is a problem with stdbool.h from gnulib: > pbool(256); Inherently non-portable when attempted with a C89 compiler. And Gnulib's replacement documents it as one of the limitations of using the replace

stdbool.h with AIX C-compiler

2008-05-15 Thread Heinrich Mislik
Hi, here is a problem with stdbool.h from gnulib: # cat bool.c #include static pbool(bool b) { if(b) printf("true\n"); else printf("false\n"); } main() { pbool(256); } # cc bool.c # ./a.out true # cc bool.c -I findutils-4.4.0/gnulib/lib/ # ./a.out false # cc bool.c -E #line 3