This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug other/81345] -Wall resets -Wstringop-overflow to 1 from the default 2
- From: "msebor at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Thu, 06 Jul 2017 20:42:35 +0000
- Subject: [Bug other/81345] -Wall resets -Wstringop-overflow to 1 from the default 2
- Auto-submitted: auto-generated
- References: <bug-81345-4@http.gcc.gnu.org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81345
Martin Sebor <msebor at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |ASSIGNED
Version|8.0 |7.0
Keywords| |diagnostic
Last reconfirmed| |2017-07-06
Component|driver |other
Assignee|unassigned at gcc dot gnu.org |msebor at gcc dot gnu.org
Ever confirmed|0 |1
Summary|-Wall resets default option |-Wall resets
|arguments to 1 |-Wstringop-overflow to 1
| |from the default 2
--- Comment #3 from Martin Sebor <msebor at gcc dot gnu.org> ---
Doh! Thanks for the hint! This ability is already there in LangEnabledBy:
LangEnabledBy(language, opt, posarg, negarg)
I expected the default LangEnabledBy setting to use the default value specified
by the Init() directive.
So it's a bug in the -Wstringop-overflow specification in the c.opt file. It
should be:
Wstringop-overflow=
C ObjC C++ ObjC++ Joined RejectNegative UInteger Var(warn_stringop_overflow)
Init(2) Warning LangEnabledBy(C ObjC C++ ObjC++, Wall, 2, 0) IntegerRange(0, 4)
With this it works as expected.