This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug c/55096] Wconversion-nul does not work in C


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

Eric Gallager <egallager at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
   Last reconfirmed|                            |2017-07-26
                 CC|                            |egallager at gcc dot gnu.org
     Ever confirmed|0                           |1

--- Comment #1 from Eric Gallager <egallager at gcc dot gnu.org> ---
Confirmed, gcc is silent even with -Wc++-compat added! 

$ /usr/local/bin/gcc -c -Wall -Wextra -Wconversion -Wc++-compat 55096.c
$

What's worse is that with g++, the -Wconversion-null warning is now an error:

$ /usr/local/bin/g++ -c -Wall -Wextra -Wconversion 55096.c
55096.c: In function ‘bool* ProcessRequest(bool*)’:
55096.c:5:17: error: cannot convert ‘bool’ to ‘bool*’ in assignment
   charge_acct = false;
                 ^~~~~
$

So this means that this is also an issue of -Wc++-compat failing to catch
something that would be an error in C++.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]