aboutsummaryrefslogtreecommitdiff
path: root/clang/lib/Headers/stdbool.h
diff options
context:
space:
mode:
Diffstat (limited to 'clang/lib/Headers/stdbool.h')
-rw-r--r--clang/lib/Headers/stdbool.h15
1 files changed, 9 insertions, 6 deletions
diff --git a/clang/lib/Headers/stdbool.h b/clang/lib/Headers/stdbool.h
index 2525363dd02a..f0e588532e16 100644
--- a/clang/lib/Headers/stdbool.h
+++ b/clang/lib/Headers/stdbool.h
@@ -10,8 +10,13 @@
#ifndef __STDBOOL_H
#define __STDBOOL_H
-/* Don't define bool, true, and false in C++, except as a GNU extension. */
-#ifndef __cplusplus
+#define __bool_true_false_are_defined 1
+
+#if __STDC_VERSION__ > 201710L
+/* FIXME: We should be issuing a deprecation warning here, but cannot yet due
+ * to system headers which include this header file unconditionally.
+ */
+#elif !defined(__cplusplus)
#define bool _Bool
#define true 1
#define false 0
@@ -20,12 +25,10 @@
#define _Bool bool
#if __cplusplus < 201103L
/* For C++98, define bool, false, true as a GNU extension. */
-#define bool bool
+#define bool bool
#define false false
-#define true true
+#define true true
#endif
#endif
-#define __bool_true_false_are_defined 1
-
#endif /* __STDBOOL_H */