bug-gnulib
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: stdbool.h with AIX C-compiler


From: Eric Blake
Subject: Re: stdbool.h with AIX C-compiler
Date: Thu, 15 May 2008 21:06:18 +0000 (UTC)
User-agent: Loom/3.14 (http://gmane.org/)

Heinrich Mislik <Heinrich.Mislik <at> 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 
<stdbool.h> is fully compliant.  It would be interesting the see the relevant 
portion of your config.log which explains why gnulib substituted its C89-style 
replacement instead of your (broken) vendor <stdbool.h>.  You may want to then 
report that bug to the AIX vendor, so that future releases of the compiler 
won't attempt to use the gnulib <stdbool.h> replacement.  And based on the 
notes in stdbool.in.h, this may be relevant:
http://lists.gnu.org/archive/html/bug-coreutils/2005-10/msg00086.html

And after more thought, maybe it IS worth a change to gnulib's stdbool, to 
use 'int' rather than 'signed char' as the replacement, when <stdbool.h> is 
broken, if only so that implicit conversion to bool does not also cause 
truncation and thus your observed silent change from true to false.  But while 
it would help in this case, it might break other cases (for example, there is 
existing gnulib code that relies on 'int a; bool b; int c = a + b;' giving 
valid results [c is either a or a+1]).

-- 
Eric Blake






reply via email to

[Prev in Thread] Current Thread [Next in Thread]