From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 22328 invoked by alias); 20 Jul 2012 18:58:56 -0000 Received: (qmail 22318 invoked by uid 22791); 20 Jul 2012 18:58:54 -0000 X-SWARE-Spam-Status: No, hits=-4.3 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00,KHOP_THREADED X-Spam-Check-By: sourceware.org Received: from localhost (HELO gcc.gnu.org) (127.0.0.1) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Fri, 20 Jul 2012 18:58:42 +0000 From: "daniel.kruegler at googlemail dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/52174] [DR 1423] Implicit conversion of nullptr to bool Date: Fri, 20 Jul 2012 18:58:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: c++ X-Bugzilla-Keywords: X-Bugzilla-Severity: trivial X-Bugzilla-Who: daniel.kruegler at googlemail dot com X-Bugzilla-Status: SUSPENDED X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Changed-Fields: CC Message-ID: In-Reply-To: References: X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org X-SW-Source: 2012-07/txt/msg01664.txt.bz2 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D52174 Daniel Kr=C3=BCgler changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |daniel.kruegler at | |googlemail dot com --- Comment #4 from Daniel Kr=C3=BCgler 2012-07-20 18:58:28 UTC --- DR 1423 has now reached ready status,=20 http://www.open-std.org/jtc1/sc22/wg21/docs/cwg_active.html#1423 so this seems like a good reason to consider a compiler change to evaluate potential code breakages. Here some recommended test-cases that should hold: 1) bool b1 =3D nullptr; // Is well-formed today, needs to be ill-formed 2) bool b2(nullptr); // well-formed today and under 1423 3) template T&& make(); template void sink(T); template(make())) > auto f(int) -> char(&)[1]; template auto f(...) -> char(&)[2]; static_assert(sizeof(f(0)) !=3D 1, "");