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++/30860] Should warn about boolean constant false used in pointer context



------- Comment #3 from manu at gcc dot gnu dot org  2007-02-19 19:14 -------
(In reply to comment #1)
> manu, is this something already covered by your pending -Wconversion fixes?
> 

No, it is not. And I don't think it should be warned by -Wconversion. After
all, no value is changed during the conversion. 

On the other hand, we give an error for:

void foo(const char *); 
void bar() { foo(1 != 0); }

error: cannot convert â??boolâ?? to â??const char*â?? for argument â??1â?? to
â??void foo(const char*)â??


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=30860


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