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; | ^