This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c/55096] Wconversion-nul does not work in C
- From: "egallager at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Wed, 26 Jul 2017 17:53:33 +0000
- Subject: [Bug c/55096] Wconversion-nul does not work in C
- Auto-submitted: auto-generated
- References: <bug-55096-4@http.gcc.gnu.org/bugzilla/>
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++.