From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 744983877034; Tue, 7 Apr 2020 18:51:43 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 744983877034 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1586285503; bh=zcsiGrzvRn6bCiuY11nnQcAZ9nyaXS+jmkt/57CX2H8=; h=From:To:Subject:Date:In-Reply-To:References:From; b=B1URCtwbTSIaEXhtNVl/2a9uZ/GiSoyia2Ez/Em/xPfyQ6UmQxwi/VSInYlwQDhZB TskvpO0zU4kgHl0Sf/U0yLeqEeXGkyQtM4v+ttDI9XvoM6E//4GX3QDIoPR/fJvcbs MBj0PtLBv0HzbIMTixm1DbyGzqsKZqpamD20nDOQ= From: "msebor at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/94510] [9/10 Regression] nullptr_t implicitly cast to zero twice in std::array Date: Tue, 07 Apr 2020 18:51:43 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: c++ X-Bugzilla-Version: 9.3.0 X-Bugzilla-Keywords: accepts-invalid, patch X-Bugzilla-Severity: normal X-Bugzilla-Who: msebor at gcc dot gnu.org X-Bugzilla-Status: ASSIGNED X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: msebor at gcc dot gnu.org X-Bugzilla-Target-Milestone: 9.4 X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: keywords Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: gcc-bugs@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-bugs mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 07 Apr 2020 18:51:43 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D94510 Martin Sebor changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords| |patch --- Comment #10 from Martin Sebor --- POINTER_TYPE_P() is zero because while nullptr is specified to be "the poin= ter literal is the keyword nullptr" it also "...is a prvalue of type std::nullptr_t. [Note: std::nullptr_t is a distinct type that is neither a pointer type nor a pointer-to-member type; ..." Of course -- a pointer lit= eral that doesn't have a pointer type, makes perfect sense. Another closely related regression r270155 introduced is the missing warning for the following test case: $ cat t.C && gcc-8 -S -Wall t.C #include int a[2] =3D { NULL }; t.C:3:19: warning: converting to non-pointer type =E2=80=98int=E2=80=99 fro= m NULL [-Wconversion-null] int a[2] =3D { NULL }; ^ The patch at the link below restores both diagnostics: https://gcc.gnu.org/pipermail/gcc-patches/2020-April/543482.html=