Bug 996714 - Invalid -Wno-xxxx flags are only reported in code generating other unrelated warnings
Invalid -Wno-xxxx flags are only reported in code generating other unrelated ...
Product: Fedora
Classification: Fedora
Component: gcc (Show other bugs)
Unspecified Unspecified
unspecified Severity unspecified
: ---
: ---
Assigned To: Jakub Jelinek
Fedora Extras Quality Assurance
Depends On:
  Show dependency treegraph
Reported: 2013-08-13 15:01 EDT by Christophe Fergeau
Modified: 2013-08-13 15:05 EDT (History)
2 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2013-08-13 15:05:45 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Christophe Fergeau 2013-08-13 15:01:34 EDT
Using gcc-4.8.1-1.fc19.x86_64 (but I've seen it with rhel6 gcc as well):

$ touch foo.c (works with a regular C program as well such as an hello world)
$ gcc -Wbadflag -c ./foo.c
gcc: error: unrecognized command line option '-Wbadflag'
$ gcc -Wno-badflag -c ./foo.c

$ echo '#warning foo' >>foo.c
$ gcc -Wno-badflag -c ./foo.c
./foo.c:1:2: warning: #warning foo [-Wcpp]
 #warning foo
cc1: warning: unrecognized command line option "-Wno-badflag" [enabled by default]

Expected result: -Wno-badflag and -Wbadflag gives the same result when they are used on a C file not producing any warnings (in this case, an empty foo.c).
Comment 1 Jakub Jelinek 2013-08-13 15:05:45 EDT
That is intentional, design decision, even documented in gcc documentation.

Note You need to log in before you can comment on or make changes to this bug.