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.