public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug preprocessor/109912] New: #pragma GCC diagnostic ignored "-Wall" is ignored
@ 2023-05-19 18:20 ed at catmur dot uk
2023-05-20 0:54 ` [Bug c/109912] " pinskia at gcc dot gnu.org
0 siblings, 1 reply; 2+ messages in thread
From: ed at catmur dot uk @ 2023-05-19 18:20 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109912
Bug ID: 109912
Summary: #pragma GCC diagnostic ignored "-Wall" is ignored
Product: gcc
Version: 14.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: preprocessor
Assignee: unassigned at gcc dot gnu.org
Reporter: ed at catmur dot uk
Target Milestone: ---
#pragma GCC diagnostic warning "-Wall"
#pragma GCC diagnostic ignored "-Wall"
int i = 0 | 1 & 2;
warning: suggest parentheses around arithmetic in operand of '|'
[-Wparentheses]
3 | int i = 0 | 1 & 2;
| ~~^~~
The expected behavior would be for `diagnostic ignored "-Wall"` to suppress all
the warnings that were enabled by `diagnostic warning "-Wall"`. If this isn't
possible, it would be good to emit a diagnostic that `diagnostic ignored
"-Wall"` has no effect.
Clang does support this and appears to have always done so.
^ permalink raw reply [flat|nested] 2+ messages in thread
* [Bug c/109912] #pragma GCC diagnostic ignored "-Wall" is ignored
2023-05-19 18:20 [Bug preprocessor/109912] New: #pragma GCC diagnostic ignored "-Wall" is ignored ed at catmur dot uk
@ 2023-05-20 0:54 ` pinskia at gcc dot gnu.org
0 siblings, 0 replies; 2+ messages in thread
From: pinskia at gcc dot gnu.org @ 2023-05-20 0:54 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109912
Andrew Pinski <pinskia at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Keywords| |diagnostic
Ever confirmed|0 |1
Status|UNCONFIRMED |NEW
Last reconfirmed| |2023-05-20
--- Comment #1 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
So it is all of the "meta"-options which have this issue as shown by:
```
#pragma GCC diagnostic warning "-Wunused"
#pragma GCC diagnostic ignored "-Wunused"
static int f() {return 0;}
```
Confirmed.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2023-05-20 0:54 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-05-19 18:20 [Bug preprocessor/109912] New: #pragma GCC diagnostic ignored "-Wall" is ignored ed at catmur dot uk
2023-05-20 0:54 ` [Bug c/109912] " pinskia at gcc dot gnu.org
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).