public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
* [Bug c++/51531] New: bool conversion to pointer should warn @ 2011-12-13 19:20 tutufan at gmail dot com 2011-12-13 19:55 ` [Bug c++/51531] " redi at gcc dot gnu.org 2011-12-13 20:00 ` redi at gcc dot gnu.org 0 siblings, 2 replies; 3+ messages in thread From: tutufan at gmail dot com @ 2011-12-13 19:20 UTC (permalink / raw) To: gcc-bugs http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51531 Bug #: 51531 Summary: bool conversion to pointer should warn Classification: Unclassified Product: gcc Version: 4.6.2 Status: UNCONFIRMED Severity: minor Priority: P3 Component: c++ AssignedTo: unassigned@gcc.gnu.org ReportedBy: tutufan@gmail.com /* clang 3.1 (trunk 145840) warns bool-convert.cpp:12:14: warning: initialization of pointer of type 'int *' to null from a constant boolean expression [-Wbool-conversions] int *p = false; ^~~~~ */ int main() { int *p = false; return !!p; } ^ permalink raw reply [flat|nested] 3+ messages in thread
* [Bug c++/51531] bool conversion to pointer should warn 2011-12-13 19:20 [Bug c++/51531] New: bool conversion to pointer should warn tutufan at gmail dot com @ 2011-12-13 19:55 ` redi at gcc dot gnu.org 2011-12-13 20:00 ` redi at gcc dot gnu.org 1 sibling, 0 replies; 3+ messages in thread From: redi at gcc dot gnu.org @ 2011-12-13 19:55 UTC (permalink / raw) To: gcc-bugs http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51531 --- Comment #1 from Jonathan Wakely <redi at gcc dot gnu.org> 2011-12-13 19:53:02 UTC --- with 4.7 b.cc: In function 'int main()': b.cc:4:14: warning: converting 'false' to pointer type 'int*' [-Wconversion-null] ^ permalink raw reply [flat|nested] 3+ messages in thread
* [Bug c++/51531] bool conversion to pointer should warn 2011-12-13 19:20 [Bug c++/51531] New: bool conversion to pointer should warn tutufan at gmail dot com 2011-12-13 19:55 ` [Bug c++/51531] " redi at gcc dot gnu.org @ 2011-12-13 20:00 ` redi at gcc dot gnu.org 1 sibling, 0 replies; 3+ messages in thread From: redi at gcc dot gnu.org @ 2011-12-13 20:00 UTC (permalink / raw) To: gcc-bugs http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51531 Jonathan Wakely <redi at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |RESOLVED Resolution| |DUPLICATE --- Comment #2 from Jonathan Wakely <redi at gcc dot gnu.org> 2011-12-13 19:59:38 UTC --- and Paolo fixed this one for 4.7 *** This bug has been marked as a duplicate of bug 48420 *** ^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2011-12-13 19:59 UTC | newest] Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2011-12-13 19:20 [Bug c++/51531] New: bool conversion to pointer should warn tutufan at gmail dot com 2011-12-13 19:55 ` [Bug c++/51531] " redi at gcc dot gnu.org 2011-12-13 20:00 ` redi at gcc dot gnu.org
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).