diff options
author | Joseph Myers <joseph@codesourcery.com> | 2020-10-29 15:05:33 +0000 |
---|---|---|
committer | Joseph Myers <joseph@codesourcery.com> | 2020-10-29 15:06:26 +0000 |
commit | 40749db75caff2fed7b7053e0d1868feaa21bcb4 (patch) | |
tree | d52db1f98393d6f74dc2edf5198e2f8a5e0b02f8 /gcc/cp/decl.c | |
parent | 8c84486bba104399b7e544cb1ba343646d39ea0a (diff) | |
download | gcc-40749db75caff2fed7b7053e0d1868feaa21bcb4.zip gcc-40749db75caff2fed7b7053e0d1868feaa21bcb4.tar.gz gcc-40749db75caff2fed7b7053e0d1868feaa21bcb4.tar.bz2 |
stdbool.h: Update true and false expansions for C2x
C2x has changed the expansions of the true and false macros in
<stdbool.h> so that they have type _Bool (including in #if conditions,
i.e. an unsigned type in that context). Use the new expansions in
GCC's <stdbool.h> for C2x.
See bug 82272 for related discussion (but this patch does *not*
implement the warning discussed there).
Note that it's possible there may be a further change to make bool,
true and false keywords (there was support in principle for that at
the April WG14 meeting). But currently these expansions of type _Bool
are what C2x requires and there isn't actually a paper before WG14 at
present that would introduce the new keywords.
Bootstrapped with no regressions on x86_64-pc-linux-gnu.
gcc/
2020-10-29 Joseph Myers <joseph@codesourcery.com>
* ginclude/stdbool.h [__STDC_VERSION__ > 201710L] (true, false):
Define with type _Bool.
gcc/testsuite/
2020-10-29 Joseph Myers <joseph@codesourcery.com>
* gcc.dg/c11-bool-1.c, gcc.dg/c2x-bool-1.c, gcc.dg/c99-bool-4.c:
New tests.
Diffstat (limited to 'gcc/cp/decl.c')
0 files changed, 0 insertions, 0 deletions