This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/30860] Should warn about boolean constant false used in pointer context
- From: "manu at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 19 Feb 2007 20:50:29 -0000
- Subject: [Bug c++/30860] Should warn about boolean constant false used in pointer context
- References: <bug-30860-10053@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #8 from manu at gcc dot gnu dot org 2007-02-19 20:50 -------
(In reply to comment #6)
> there is an implicit value conversion, boolean "false" to address "0". I think
> that is the definition of -Wconversion, no?
>
> anyway, I'll work on a patch.
>
Take a look at http://gcc.gnu.org/ml/gcc-patches/2007-02/txt00054.txt and
particularly at cp/call.c (convert_like_real). I think the warning should go
there with the other NULL warnings.
Cheers,
Manuel.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=30860