public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "eggert at cs dot ucla.edu" <gcc-bugzilla@gcc.gnu.org> 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 [thread overview] Message-ID: <bug-106947-4@http.gcc.gnu.org/bugzilla/> (raw) https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106947 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 = &s; int main () { int error = 0; { _Bool e1 = &s; if (!e1) error = 1; } return error; } The output is the meaningless diagnostic: t.c: In function ‘main’: t.c:2:5: note: ‘s’ declared here 2 | int s; | ^
next reply other threads:[~2022-09-14 20:31 UTC|newest] Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top 2022-09-14 20:31 eggert at cs dot ucla.edu [this message] 2022-09-14 20:39 ` [Bug c/106947] " pinskia at gcc dot gnu.org 2022-09-14 20:39 ` pinskia at gcc dot gnu.org 2022-09-14 20:42 ` [Bug c/106947] [12/13 Regression] " pinskia at gcc dot gnu.org 2022-09-15 7:19 ` rguenth at gcc dot gnu.org 2022-09-15 15:19 ` mpolacek at gcc dot gnu.org 2022-09-19 18:41 ` cvs-commit at gcc dot gnu.org 2022-09-19 18:43 ` cvs-commit at gcc dot gnu.org 2022-09-19 18:43 ` mpolacek at gcc dot gnu.org 2023-03-16 12:25 ` marxin at gcc dot gnu.org
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=bug-106947-4@http.gcc.gnu.org/bugzilla/ \ --to=gcc-bugzilla@gcc.gnu.org \ --cc=gcc-bugs@gcc.gnu.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
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).