This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/48420] Missed -Wconversion-null warning when passing const bool to T*
- From: "paolo at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Fri, 04 Nov 2011 16:31:23 +0000
- Subject: [Bug c++/48420] Missed -Wconversion-null warning when passing const bool to T*
- Auto-submitted: auto-generated
- References: <bug-48420-4@http.gcc.gnu.org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48420
--- Comment #4 from paolo at gcc dot gnu.org <paolo at gcc dot gnu.org> 2011-11-04 16:31:23 UTC ---
Author: paolo
Date: Fri Nov 4 16:31:18 2011
New Revision: 180963
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=180963
Log:
/cp
2011-11-04 Paolo Carlini <paolo.carlini@oracle.com>
PR c++/48420
* call.c (conversion_null_warnings): For 'false' to NULL pointer,
just check that TREE_TYPE (expr) is a BOOLEAN_TYPE.
/testsuite
2011-11-04 Paolo Carlini <paolo.carlini@oracle.com>
PR c++/48420
* g++.dg/warn/Wconversion-null-3.C: New.
Added:
trunk/gcc/testsuite/g++.dg/warn/Wconversion-null-3.C
Modified:
trunk/gcc/cp/ChangeLog
trunk/gcc/cp/call.c
trunk/gcc/testsuite/ChangeLog