]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
Doc: Document _Bool type as C90 extension [PR118118]
authorSandra Loosemore <sloosemore@baylibre.com>
Tue, 1 Apr 2025 23:10:16 +0000 (23:10 +0000)
committerSandra Loosemore <sloosemore@baylibre.com>
Tue, 1 Apr 2025 23:13:21 +0000 (23:13 +0000)
gcc/ChangeLog
PR c/118118
* doc/extend.texi (Boolean Type): New section.

gcc/doc/extend.texi

index 76fb210060da40a89e00598d3e65761b5a551bc9..d2bf6048be78ac4223a2758feb717e27fe1cd3a2 100644 (file)
@@ -12944,6 +12944,7 @@ C and/or C++ standards, while others remain specific to GNU C.
 * Offsetof::            Special syntax for @code{offsetof}.
 * Alignment::           Determining the alignment of a function, type or variable.
 * Enum Extensions::     Forward declarations and specifying the underlying type.
+* Boolean Type::       Support for the @code{_Bool} keyword.
 * Variadic Macros::     Macros with a variable number of arguments.
 * Conditionals::        Omitting the middle operand of a @samp{?:} expression.
 * Case Ranges::         `case 1 ... 9' and such.
@@ -13698,6 +13699,17 @@ Forward-declaring an incomplete enum type without an explicit
 underlying type is supported as an extension in all GNU C dialects,
 but is not supported at all in GNU C++.
 
+@node Boolean Type
+@subsection Support for the @code{_Bool} Type
+@cindex boolean type
+@cindex @code{_Bool} keyword
+
+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.
+
 @node Variadic Macros
 @subsection Macros with a Variable Number of Arguments.
 @cindex variable number of arguments