diff options
Diffstat (limited to 'contrib/llvm/tools/clang/lib/Headers/stdbool.h')
-rw-r--r-- | contrib/llvm/tools/clang/lib/Headers/stdbool.h | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/contrib/llvm/tools/clang/lib/Headers/stdbool.h b/contrib/llvm/tools/clang/lib/Headers/stdbool.h index e44a1f9..0467893 100644 --- a/contrib/llvm/tools/clang/lib/Headers/stdbool.h +++ b/contrib/llvm/tools/clang/lib/Headers/stdbool.h @@ -26,11 +26,17 @@ #ifndef __STDBOOL_H #define __STDBOOL_H -/* Don't define bool, true, and false in C++ */ +/* Don't define bool, true, and false in C++, except as a GNU extension. */ #ifndef __cplusplus #define bool _Bool #define true 1 #define false 0 +#elif defined(__GNUC__) && !defined(__STRICT_ANSI__) +/* Define _Bool, bool, false, true as a GNU extension. */ +#define _Bool bool +#define bool bool +#define false false +#define true true #endif #define __bool_true_false_are_defined 1 |