diff options
author | Jonathan Wakely <jwakely@redhat.com> | 2014-10-24 21:56:40 +0100 |
---|---|---|
committer | Jonathan Wakely <redi@gcc.gnu.org> | 2014-10-24 21:56:40 +0100 |
commit | fbee6d3164ed509ebe08222264f352fecf1c9824 (patch) | |
tree | a5bf73d7edf36c2971cea3efb947f4c72e53a4f1 /gcc/ginclude/stdbool.h | |
parent | 229c59193afa304d5f3f214a691e355b3cd89d6d (diff) | |
download | gcc-fbee6d3164ed509ebe08222264f352fecf1c9824.zip gcc-fbee6d3164ed509ebe08222264f352fecf1c9824.tar.gz gcc-fbee6d3164ed509ebe08222264f352fecf1c9824.tar.bz2 |
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.
From-SVN: r216679
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 f4e802f..a06f17f2 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 */ |