On 05/28/2012 06:39 PM, Jason Merrill wrote:
OK.
Thanks. I also applied as obvious the below, provided by Manuel, and changing this warning too to use the new LangEnabledBy.

Paolo.

/////////////////////////
2012-05-29  Manuel López-Ibáñez  <m...@gcc.gnu.org>

        * c.opt (Wmissing-braces): Use LangEnabledBy(C ObjC,Wall).
        * c-opts.c (c_common_handle_option): Remove code handling
        warn_missing_braces.
Index: c.opt
===================================================================
--- c.opt       (revision 187936)
+++ c.opt       (working copy)
@@ -463,7 +463,7 @@ C ObjC C++ ObjC++ Var(warn_main) Init(-1) Warning
 Warn about suspicious declarations of \"main\"
 
 Wmissing-braces
-C ObjC C++ ObjC++ Var(warn_missing_braces) Warning
+C ObjC C++ ObjC++ Var(warn_missing_braces) Warning LangEnabledBy(C ObjC,Wall)
 Warn about possibly missing braces around initializers
 
 Wmissing-declarations
Index: c-opts.c
===================================================================
--- c-opts.c    (revision 187937)
+++ c-opts.c    (working copy)
@@ -401,8 +401,6 @@ c_common_handle_option (size_t scode, const char *
             done in c_common_post_options.  */
           if (warn_enum_compare == -1)
             warn_enum_compare = value;
-
-         warn_missing_braces = value;
        }
       else
        {

Reply via email to