summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorEric Blake <eblake@redhat.com>2010-04-16 17:04:58 -0600
committerEric Blake <eblake@redhat.com>2010-04-16 17:11:27 -0600
commitfef5e6b4fc847bb1c01a20314effae7cb7828f38 (patch)
tree3fe170cbd5d3898a28c86b1e2139137e9c9079ec /lib
parente37c1207ef427c4af2b5d16050e0e548e6384b4a (diff)
downloadgnulib-fef5e6b4fc847bb1c01a20314effae7cb7828f38.tar.gz
test-stdbool: skip test that fails with Solaris CC
Solaris 9 CC has a bug; it allows (int)0.0 and (bool)0 in constant expressions, but not (bool)0.0. Our replacement stdbool cannot provide that guarantee of C99 for this particular compiler, but since use of that feature causes compilation failure rather than silent mis-compilation, we just skip the test. * tests/test-stdbool.c (f): Skip test that causes compilation error under buggy C++ compiler. * lib/stdbool.in.h: Document the limitation. * doc/posix-headers/stdbool.texi (stdbool.h): Likewise. Signed-off-by: Eric Blake <eblake@redhat.com>
Diffstat (limited to 'lib')
-rw-r--r--lib/stdbool.in.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/stdbool.in.h b/lib/stdbool.in.h
index 881faf3cf9..d589cb45f8 100644
--- a/lib/stdbool.in.h
+++ b/lib/stdbool.in.h
@@ -50,6 +50,9 @@
with this substitute. With this substitute, only the values 0 and 1
give the expected result when converted to _Bool' or 'bool'.
+ - C99 allows the use of (_Bool)0.0 in constant expressions, but
+ this substitute cannot always provide this property.
+
Also, it is suggested that programs use 'bool' rather than '_Bool';
this isn't required, but 'bool' is more common. */