https://gcc.gnu.org/bugzilla/show_bug.cgi?id=60304

Martin Sebor <msebor at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Last reconfirmed|2014-10-06 00:00:00         |2016-1-4
                 CC|                            |msebor at gcc dot gnu.org
            Summary|Including <atomic> disables |Including <stdbool.h>
                   |-Wconversion-null           |disables -Wconversion-null
                   |                            |in C++ 98 mode
      Known to fail|                            |4.9.3, 5.1.0, 6.0

--- Comment #23 from Martin Sebor <msebor at gcc dot gnu.org> ---
The original test case with <atomic> works as expected with 4.9.3, 5.1.0, and
today's trunk (6.0).

What doesn't work correctly is including <stdbool.h> in the test case and
compiling it in C++ 98 mode.  The test case below shows there's still no
warning there.  This is because Jonathan's patch left false defined as a macro
in C++ 98 for compatibility, and the system header preprocessor bug still
hasn't been fixed.

I'm changing the Summary to reflect what still doesn't work and to make this
bug easier to find, though it could also probably be closed as a duplicate of
the underlying system header preprocessor bug (if only I could find it).

$ cat a.cpp && /home/msebor/build/gcc-trunk-svn/gcc/xgcc
-B/home/msebor/build/gcc-trunk-svn/gcc
-I/home/msebor/build/gcc-trunk-svn/x86_64-pc-linux-gnu/libstdc++-v3/include/x86_64-pc-linux-gnu
-I/home/msebor/build/gcc-trunk-svn/x86_64-pc-linux-gnu/libstdc++-v3/include -S
-Wall -Werror -o/dev/null -std=c++98 a.cpp
#include <stdbool.h>

int* foo () { return false; }

Reply via email to