diff options
author | redi <redi@138bc75d-0d04-0410-961f-82ee72b054a4> | 2014-10-24 20:56:40 +0000 |
---|---|---|
committer | redi <redi@138bc75d-0d04-0410-961f-82ee72b054a4> | 2014-10-24 20:56:40 +0000 |
commit | 8fc0073bfb9975d34c0f9314d2ee1da1ad27461d (patch) | |
tree | a5bf73d7edf36c2971cea3efb947f4c72e53a4f1 /gcc/ginclude/stdbool.h | |
parent | e39efcefc5fba7c339ea9dca6bcfa103b5adfbea (diff) | |
download | gcc-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.h | 6 |
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 */ |