diff options
author | Jonathan Wakely <jwakely@redhat.com> | 2020-09-02 18:51:28 +0100 |
---|---|---|
committer | Jonathan Wakely <jwakely@redhat.com> | 2020-09-02 18:51:28 +0100 |
commit | f049cda373d29ea1bce4065b24cbb392cdc5b172 (patch) | |
tree | fd49955b9ee707ee627bca078253f463ab640d9c /gcc/cp/init.c | |
parent | ce90d203cea33a4bfd4e415f601fe4486ecbb45d (diff) | |
download | gcc-f049cda373d29ea1bce4065b24cbb392cdc5b172.zip gcc-f049cda373d29ea1bce4065b24cbb392cdc5b172.tar.gz gcc-f049cda373d29ea1bce4065b24cbb392cdc5b172.tar.bz2 |
c++: Stop defining true, false and bool as macros in <stdbool.h>
Since r216679 these macros have only been defined in C++98 mode, rather
than all modes. That is permitted as a GNU extension because that header
doesn't exist in the C++ standard until C++11, so we can make it do
whatever we want for C++98. But as discussed in the PR c++/60304
comments, these macros shouldn't ever be defined for C++.
This patch removes the macro definitions for C++98 too.
The new test already passed for C++98 (and the conversion is ill-formed
in C++11 and later) so this new test is arguably unnecessary.
gcc/ChangeLog:
PR c++/60304
* ginclude/stdbool.h (bool, false, true): Never define for C++.
gcc/testsuite/ChangeLog:
PR c++/60304
* g++.dg/warn/Wconversion-null-5.C: New test.
Diffstat (limited to 'gcc/cp/init.c')
0 files changed, 0 insertions, 0 deletions