summaryrefslogtreecommitdiff
path: root/gcc/ginclude/stdbool.h
diff options
context:
space:
mode:
authorredi <redi@138bc75d-0d04-0410-961f-82ee72b054a4>2014-10-24 20:56:40 +0000
committerredi <redi@138bc75d-0d04-0410-961f-82ee72b054a4>2014-10-24 20:56:40 +0000
commit8fc0073bfb9975d34c0f9314d2ee1da1ad27461d (patch)
treea5bf73d7edf36c2971cea3efb947f4c72e53a4f1 /gcc/ginclude/stdbool.h
parente39efcefc5fba7c339ea9dca6bcfa103b5adfbea (diff)
downloadgcc-8fc0073bfb9975d34c0f9314d2ee1da1ad27461d.tar.gz
C++11 explicitly forbids macros for bool, true and false.
gcc: * ginclude/stdbool.h: Do not define bool, true or false in C++11. libstdc++-v3: * testsuite/18_support/headers/cstdbool/macros.cc: New. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@216679 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/ginclude/stdbool.h')
-rw-r--r--gcc/ginclude/stdbool.h6
1 files changed, 5 insertions, 1 deletions
diff --git a/gcc/ginclude/stdbool.h b/gcc/ginclude/stdbool.h
index f4e802fe4d6..a06f17f2460 100644
--- a/gcc/ginclude/stdbool.h
+++ b/gcc/ginclude/stdbool.h
@@ -36,11 +36,15 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
#else /* __cplusplus */
-/* Supporting <stdbool.h> in C++ is a GCC extension. */
+/* Supporting _Bool in C++ is a GCC extension. */
#define _Bool bool
+
+#if __cplusplus < 201103L
+/* Defining these macros in C++98 is a GCC extension. */
#define bool bool
#define false false
#define true true
+#endif
#endif /* __cplusplus */