public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
* [Bug c++/67216] New: false is still a null pointer constant @ 2015-08-14 12:45 potswa at mac dot com 2015-08-14 13:09 ` [Bug c++/67216] " redi at gcc dot gnu.org ` (4 more replies) 0 siblings, 5 replies; 6+ messages in thread From: potswa at mac dot com @ 2015-08-14 12:45 UTC (permalink / raw) To: gcc-bugs https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67216 Bug ID: 67216 Summary: false is still a null pointer constant Product: gcc Version: 6.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: potswa at mac dot com Target Milestone: --- false should not convert to pointer types since C++11. This program is ill formed in C++03 and well formed in C++11. struct s { s( long ) {} }; struct t { t( void * ) {} } void foo(s) {} void foo(t) {} int main() { foo(false); } ^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug c++/67216] false is still a null pointer constant 2015-08-14 12:45 [Bug c++/67216] New: false is still a null pointer constant potswa at mac dot com @ 2015-08-14 13:09 ` redi at gcc dot gnu.org 2015-08-14 18:58 ` pravasimeet999 at yahoo dot com ` (3 subsequent siblings) 4 siblings, 0 replies; 6+ messages in thread From: redi at gcc dot gnu.org @ 2015-08-14 13:09 UTC (permalink / raw) To: gcc-bugs https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67216 Jonathan Wakely <redi at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords| |accepts-invalid Status|UNCONFIRMED |NEW Last reconfirmed| |2015-08-14 Ever confirmed|0 |1 ^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug c++/67216] false is still a null pointer constant 2015-08-14 12:45 [Bug c++/67216] New: false is still a null pointer constant potswa at mac dot com 2015-08-14 13:09 ` [Bug c++/67216] " redi at gcc dot gnu.org @ 2015-08-14 18:58 ` pravasimeet999 at yahoo dot com 2015-08-17 21:40 ` paolo at gcc dot gnu.org ` (2 subsequent siblings) 4 siblings, 0 replies; 6+ messages in thread From: pravasimeet999 at yahoo dot com @ 2015-08-14 18:58 UTC (permalink / raw) To: gcc-bugs https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67216 Pravasi Meet <pravasimeet999 at yahoo dot com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |pravasimeet999 at yahoo dot com --- Comment #1 from Pravasi Meet <pravasimeet999 at yahoo dot com> --- This bug came into observation by the question that was asked on StackOverflow user Pravasi Meet. See this http://stackoverflow.com/questions/32009694/why-implicit-conversion-of-bool-to-string-isnt-an-error/32009989?noredirect=1#comment51927225_32009989 link. ^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug c++/67216] false is still a null pointer constant 2015-08-14 12:45 [Bug c++/67216] New: false is still a null pointer constant potswa at mac dot com 2015-08-14 13:09 ` [Bug c++/67216] " redi at gcc dot gnu.org 2015-08-14 18:58 ` pravasimeet999 at yahoo dot com @ 2015-08-17 21:40 ` paolo at gcc dot gnu.org 2015-08-17 21:42 ` paolo.carlini at oracle dot com 2015-08-18 18:05 ` redi at gcc dot gnu.org 4 siblings, 0 replies; 6+ messages in thread From: paolo at gcc dot gnu.org @ 2015-08-17 21:40 UTC (permalink / raw) To: gcc-bugs https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67216 --- Comment #3 from paolo at gcc dot gnu.org <paolo at gcc dot gnu.org> --- Author: paolo Date: Mon Aug 17 21:40:07 2015 New Revision: 226956 URL: https://gcc.gnu.org/viewcvs?rev=226956&root=gcc&view=rev Log: /cp 2015-08-17 Paolo Carlini <paolo.carlini@oracle.com> PR c++/67216 * call.c (null_ptr_cst_p): In C++11 return 'false' for 'false'. /testsuite 2015-08-17 Paolo Carlini <paolo.carlini@oracle.com> PR c++/67216 * g++.dg/cpp0x/nullptr34.C: New. * g++.dg/warn/Wconversion2.C: Adjust. * g++.dg/warn/Wnull-conversion-1.C: Likewise. * g++.old-deja/g++.other/null3.C: Likewise. * g++.dg/cpp0x/pr51313.C: Adjust. Added: trunk/gcc/testsuite/g++.dg/cpp0x/nullptr34.C Modified: trunk/gcc/cp/ChangeLog trunk/gcc/cp/call.c trunk/gcc/testsuite/ChangeLog trunk/gcc/testsuite/g++.dg/cpp0x/pr51313.C trunk/gcc/testsuite/g++.dg/warn/Wconversion2.C trunk/gcc/testsuite/g++.dg/warn/Wnull-conversion-1.C trunk/gcc/testsuite/g++.old-deja/g++.other/null3.C ^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug c++/67216] false is still a null pointer constant 2015-08-14 12:45 [Bug c++/67216] New: false is still a null pointer constant potswa at mac dot com ` (2 preceding siblings ...) 2015-08-17 21:40 ` paolo at gcc dot gnu.org @ 2015-08-17 21:42 ` paolo.carlini at oracle dot com 2015-08-18 18:05 ` redi at gcc dot gnu.org 4 siblings, 0 replies; 6+ messages in thread From: paolo.carlini at oracle dot com @ 2015-08-17 21:42 UTC (permalink / raw) To: gcc-bugs https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67216 Paolo Carlini <paolo.carlini at oracle dot com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|ASSIGNED |RESOLVED Resolution|--- |FIXED Assignee|paolo.carlini at oracle dot com |unassigned at gcc dot gnu.org Target Milestone|--- |6.0 --- Comment #4 from Paolo Carlini <paolo.carlini at oracle dot com> --- Fixed. ^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug c++/67216] false is still a null pointer constant 2015-08-14 12:45 [Bug c++/67216] New: false is still a null pointer constant potswa at mac dot com ` (3 preceding siblings ...) 2015-08-17 21:42 ` paolo.carlini at oracle dot com @ 2015-08-18 18:05 ` redi at gcc dot gnu.org 4 siblings, 0 replies; 6+ messages in thread From: redi at gcc dot gnu.org @ 2015-08-18 18:05 UTC (permalink / raw) To: gcc-bugs https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67216 --- Comment #5 from Jonathan Wakely <redi at gcc dot gnu.org> --- Author: redi Date: Tue Aug 18 18:04:48 2015 New Revision: 226986 URL: https://gcc.gnu.org/viewcvs?rev=226986&root=gcc&view=rev Log: PR c++/67216 * testsuite/tr1/2_general_utilities/shared_ptr/observers/bool_conv.cc: Fix use of safe-bool idiom that isn't valid in C++11. Modified: trunk/libstdc++-v3/ChangeLog trunk/libstdc++-v3/testsuite/tr1/2_general_utilities/shared_ptr/observers/bool_conv.cc ^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2015-08-18 18:05 UTC | newest] Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2015-08-14 12:45 [Bug c++/67216] New: false is still a null pointer constant potswa at mac dot com 2015-08-14 13:09 ` [Bug c++/67216] " redi at gcc dot gnu.org 2015-08-14 18:58 ` pravasimeet999 at yahoo dot com 2015-08-17 21:40 ` paolo at gcc dot gnu.org 2015-08-17 21:42 ` paolo.carlini at oracle dot com 2015-08-18 18:05 ` 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).