diff options
author | Sandra Loosemore <sloosemore@baylibre.com> | 2025-04-01 23:10:16 +0000 |
---|---|---|
committer | Sandra Loosemore <sloosemore@baylibre.com> | 2025-04-01 23:13:21 +0000 |
commit | 4c708fa411fa708e7abc717b0880d6f708967a37 (patch) | |
tree | 53b20596fbef0000fe35bfd538e91a26b0c17c67 /gcc | |
parent | 358f7a954584ccefeef41390852d002c60ec11c0 (diff) | |
download | gcc-4c708fa411fa708e7abc717b0880d6f708967a37.zip gcc-4c708fa411fa708e7abc717b0880d6f708967a37.tar.gz gcc-4c708fa411fa708e7abc717b0880d6f708967a37.tar.bz2 |
Doc: Document _Bool type as C90 extension [PR118118]
gcc/ChangeLog
PR c/118118
* doc/extend.texi (Boolean Type): New section.
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/doc/extend.texi | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/gcc/doc/extend.texi b/gcc/doc/extend.texi index 76fb210..d2bf604 100644 --- a/gcc/doc/extend.texi +++ b/gcc/doc/extend.texi @@ -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 |