aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSandra Loosemore <sloosemore@baylibre.com>2025-04-06 16:03:48 +0000
committerSandra Loosemore <sloosemore@baylibre.com>2025-04-06 16:08:01 +0000
commitb39d5fad621c25812fb764e3a8808bab3f2fe774 (patch)
treea47dd2fbb5338ca51564457cbb58c6677d7dfd6b
parent939fa28d265d4707ad717fcff0c46329b6dc39c2 (diff)
downloadgcc-b39d5fad621c25812fb764e3a8808bab3f2fe774.zip
gcc-b39d5fad621c25812fb764e3a8808bab3f2fe774.tar.gz
gcc-b39d5fad621c25812fb764e3a8808bab3f2fe774.tar.bz2
Doc: Further clarify support for _Bool type
gcc/ChangeLog * doc/extend.texi (Boolean Type): Further clarify support for _Bool in C23 and C++.
-rw-r--r--gcc/doc/extend.texi8
1 files changed, 7 insertions, 1 deletions
diff --git a/gcc/doc/extend.texi b/gcc/doc/extend.texi
index 16ad83f..ae3357f 100644
--- a/gcc/doc/extend.texi
+++ b/gcc/doc/extend.texi
@@ -13814,7 +13814,13 @@ The C99 standard added @code{_Bool} as a C language keyword naming the
boolean type. As an extension, GNU C also recognizes @code{_Bool} in
C90 mode as well as with @option{-std=c99} and later.
-GNU C++ does not support the @code{_Bool} keyword.
+C23 added @code{bool} as the preferred name of the boolean type, but
+@code{_Bool} also remains a standard keyword in the language and is
+supported as such by GCC with @option{-std=c23}.
+
+GNU C++ does not support @code{_Bool} as a keyword, but including
+@code{<stdbool.h>} defines it as a macro in terms of standard C++'s
+@code{bool} type.
@node Variadic Macros
@subsection Macros with a Variable Number of Arguments.