2 @section @file{stdbool.h}
4 POSIX specification:@* @url{http://www.opengroup.org/onlinepubs/9699919799/basedefs/stdbool.h.html}
8 Portability problems fixed by Gnulib:
11 This header file is missing on some platforms:
12 AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1.
14 Some compilers have bugs relating to @samp{bool}.
16 This header file defines @code{true} incorrectly on some platforms:
17 OpenBSD 4.7 with gcc 2.95.
20 Portability problems not fixed by Gnulib:
23 @samp{_Bool} cannot be used before @code{<stdbool.h>} is included, or if
24 the program is intended to be compiled by a C++ compiler.
26 You cannot assume that @code{_Bool} is a typedef; it might be a macro.
28 Bit-fields of type @samp{bool} are not supported. Portable code
29 should use @samp{unsigned int foo : 1;} rather than @samp{bool foo : 1;}.
31 Casts and automatic conversions to @samp{bool} don't test against the
32 zero value or the null pointer, as they should. Such casts should only
33 be used if the value is known to be equal to 0 or 1.
35 You cannot assume that casting a floating point literal to @samp{bool} will
36 result in a constant expression.