https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61480

            Bug ID: 61480
           Summary: GCC options processing: Init() requires Var() for
                    'no-' to work as expected
           Product: gcc
           Version: 4.10.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: other
          Assignee: unassigned at gcc dot gnu.org
          Reporter: gary at intrepid dot com
                CC: jsm28 at gcc dot gnu.org, nenad at intrepid dot com

While researching an issue related to Bug 60439, I noticed that the
specification for the -Wswitch-bool option quietly ignored -Wno-switch-bool. 
This was fixed by adding a Var() clause.


Index: gcc/c-family/c.opt
===================================================================
--- gcc/c-family/c.opt  (revision 211365)
+++ gcc/c-family/c.opt  (working copy)
@@ -539,7 +539,7 @@ C ObjC C++ ObjC++ Var(warn_switch_enum)
 Warn about all enumerated switches missing a specific case

 Wswitch-bool
-C ObjC C++ ObjC++ Warning Init(1)
+C ObjC C++ ObjC++ Var(warn_switch_bool) Warning Init(1)
 Warn about switches with boolean controlling expression

The internal document describing the format of the c.opt file didn't appear to
mention this requirement.  If there is such a requirement for things to work as
expected, perhaps the tool that processes the options specification file should
issue an error when Init() is present, but Var() is not?

Reply via email to