diff options
-rw-r--r-- | gcc/ginclude/stdbool.h | 7 | ||||
-rw-r--r-- | gcc/testsuite/g++.dg/warn/Wconversion-null-5.C | 6 |
2 files changed, 6 insertions, 7 deletions
diff --git a/gcc/ginclude/stdbool.h b/gcc/ginclude/stdbool.h index 72be438692f..1b56498d96f 100644 --- a/gcc/ginclude/stdbool.h +++ b/gcc/ginclude/stdbool.h @@ -39,13 +39,6 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see /* 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 */ /* Signal that all the definitions are present. */ diff --git a/gcc/testsuite/g++.dg/warn/Wconversion-null-5.C b/gcc/testsuite/g++.dg/warn/Wconversion-null-5.C new file mode 100644 index 00000000000..05980ea91ab --- /dev/null +++ b/gcc/testsuite/g++.dg/warn/Wconversion-null-5.C @@ -0,0 +1,6 @@ +// PR c++/60304 +// { dg-do compile { target c++98_only } } +// { dg-options "-Wconversion-null" } + +#include <stdbool.h> +int * foo() {return false;} // { dg-warning "converting 'false' to pointer" } |