From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 836793855033; Wed, 30 Jun 2021 14:50:13 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 836793855033 From: "marxin at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: =?UTF-8?B?W0J1ZyB0cmVlLW9wdGltaXphdGlvbi8xMDEyNzJdIE5ldzogWzEy?= =?UTF-8?B?IFJlZ3Jlc3Npb25dIGVycm9yOiDigJhub25udWxs4oCZIGFyZ3VtZW50IA==?= =?UTF-8?B?4oCYbWVzc2FnZeKAmSBjb21wYXJlZCB0byBOVUxMIFstV2Vycm9yPW5vbm51?= =?UTF-8?B?bGwtY29tcGFyZV0gc2luY2U=?= Date: Wed, 30 Jun 2021 14:50:13 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: tree-optimization X-Bugzilla-Version: 12.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: marxin at gcc dot gnu.org X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_id short_desc product version bug_status bug_severity priority component assigned_to reporter cc target_milestone Message-ID: 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: Wed, 30 Jun 2021 14:50:13 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D101272 Bug ID: 101272 Summary: [12 Regression] error: =E2=80=98nonnull=E2=80=99 argume= nt =E2=80=98message=E2=80=99 compared to NULL [-Werror=3Dnonnull-compare] since Product: gcc Version: 12.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: tree-optimization Assignee: unassigned at gcc dot gnu.org Reporter: marxin at gcc dot gnu.org CC: msebor at gcc dot gnu.org Target Milestone: --- Seen in gdb package, the error is likely fine, but I'm curious why is it visible since the mentioned revision? $ cat gdb.ii void internal_error(char); struct compiled_regex { compiled_regex(const char *) __attribute__((__nonnull__)); }; compiled_regex::compiled_regex(const char *message) { (message !=3D __null) ? 0 : (internal_error(0), 0); } $ g++ gdb.ii -c -Werror=3Dnonnull-compare gdb.ii: In constructor =E2=80=98compiled_regex::compiled_regex(const char*)= =E2=80=99: gdb.ii:6:23: error: =E2=80=98nonnull=E2=80=99 argument =E2=80=98message=E2= =80=99 compared to NULL [-Werror=3Dnonnull-compare] 6 | (message !=3D __null) ? 0 : (internal_error(0), 0); | ~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~ cc1plus: some warnings being treated as errors=