public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug preprocessor/66505] New: -Wno-error=pedantic does not reverse -Werror -Wpedantic
@ 2015-06-11 11:19 chrysn at fsfe dot org
0 siblings, 0 replies; only message in thread
From: chrysn at fsfe dot org @ 2015-06-11 11:19 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66505
Bug ID: 66505
Summary: -Wno-error=pedantic does not reverse -Werror
-Wpedantic
Product: gcc
Version: 4.9.2
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: preprocessor
Assignee: unassigned at gcc dot gnu.org
Reporter: chrysn at fsfe dot org
Target Milestone: ---
the -Wno-error=pedantic option fails to undo the combined effects of -Werror
and -Wpedantic, for example when dealing with binary constants.
code like
int main() { int i = 0b0; }
fails to compile with `-Werror -Wpedantic`, while it does compile with either
option, and adding the `-Wno-error=pedantic` option does not change that.
the error message shown is
error: binary constants are a GCC extension [-Werror]
which indicates that no special-purpose warning exists for the behavior. it has
been suggested by redi on irc that a `-Wbinary-constants` should be introduced
(along with other specific labels like imaginary-constants) to combat this, and
that the relevant code is around libcpp/expr.c:697.
as a workaround, i'm explicitly setting every -Wfoo option (except -Wpedantic)
as -Werror=foo.
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2015-06-11 11:19 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-06-11 11:19 [Bug preprocessor/66505] New: -Wno-error=pedantic does not reverse -Werror -Wpedantic chrysn at fsfe dot 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).