From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id A413A3857C59; Wed, 14 Sep 2022 20:31:06 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org A413A3857C59 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1663187466; bh=M/zToyC7V2LISVno8JyLhtdH/ceGlgXxU+LuT5QE4/Q=; h=From:To:Subject:Date:From; b=OtMOTiRvRk0p3+qIBXyJNVRH6+ai45hdTwVfMweJEbisDwEJaI64VsBpndsEnATLa uo0r3QkCmD1yCxk4BTIAmFqjWiRWXu6gjMoxoqfJi9uE5KnEeenINjLfjbch8to/XD QasWE76ly++f75kMzoAglyNapWQlyPEt4ENAxMKY= From: "eggert at cs dot ucla.edu" To: gcc-bugs@gcc.gnu.org Subject: [Bug middle-end/106947] New: -Waddress + bool + pragma generates meaningless diagnostic Date: Wed, 14 Sep 2022 20:31:06 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: middle-end X-Bugzilla-Version: 12.1.1 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: eggert at cs dot ucla.edu 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 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 List-Id: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D106947 Bug ID: 106947 Summary: -Waddress + bool + pragma generates meaningless diagnostic Product: gcc Version: 12.1.1 Status: UNCONFIRMED Severity: normal Priority: P3 Component: middle-end Assignee: unassigned at gcc dot gnu.org Reporter: eggert at cs dot ucla.edu Target Milestone: --- I found this while testing Gnulib with gcc (GCC) 12.1.1 20220507 (Red Hat 12.1.1-1) on x86-64. Compile the following with "gcc -Waddress -S t.c": #pragma GCC diagnostic ignored "-Waddress" int s; _Bool e =3D &s; int main () { int error =3D 0; { _Bool e1 =3D &s; if (!e1) error =3D 1; } return error; } The output is the meaningless diagnostic: t.c: In function =E2=80=98main=E2=80=99: t.c:2:5: note: =E2=80=98s=E2=80=99 declared here 2 | int s; | ^=