]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
Doc: Further clarify support for _Bool type
authorSandra Loosemore <sloosemore@baylibre.com>
Sun, 6 Apr 2025 16:03:48 +0000 (16:03 +0000)
committerSandra Loosemore <sloosemore@baylibre.com>
Sun, 6 Apr 2025 16:08:01 +0000 (16:08 +0000)
gcc/ChangeLog
* doc/extend.texi (Boolean Type): Further clarify support for
_Bool in C23 and C++.

gcc/doc/extend.texi

index 16ad83fc510c9db0d935bae1e4ea1fc6ced8f366..ae3357f83bffc7e7eb42a4fcd023dea7e0e0d703 100644 (file)
@@ -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.