c.opt (Wc++11-compat): Make primary.
authorJason Merrill <jason@redhat.com>
Sat, 9 May 2015 04:50:15 +0000 (00:50 -0400)
committerJason Merrill <jason@gcc.gnu.org>
Sat, 9 May 2015 04:50:15 +0000 (00:50 -0400)
gcc/c-family/
* c.opt (Wc++11-compat): Make primary.  Rename var warn_cxx11_compat.
* c-opts.c: Adjust.
gcc/cp/
* cp-gimplify.c, parser.c: Adjust.

From-SVN: r222962

gcc/c-family/ChangeLog
gcc/c-family/c-opts.c
gcc/c-family/c.opt
gcc/cp/ChangeLog
gcc/cp/cp-gimplify.c
gcc/cp/parser.c

index 17fb72f..1019aea 100644 (file)
@@ -1,5 +1,8 @@
 2015-05-08  Jason Merrill  <jason@redhat.com>
 
+       * c.opt (Wc++11-compat): Make primary.  Rename var warn_cxx11_compat.
+       * c-opts.c: Adjust.
+
        * c.opt (Wc++0x-compat): Also set cpp_warn_cxx11_compat.
 
 2015-05-08  Marek Polacek  <polacek@redhat.com>
index a61d6a8..8b17674 100644 (file)
@@ -900,7 +900,7 @@ c_common_post_options (const char **pfilename)
     {
       /* If we're allowing C++0x constructs, don't warn about C++98
         identifiers which are keywords in C++0x.  */
-      warn_cxx0x_compat = 0;
+      warn_cxx11_compat = 0;
 
       if (warn_narrowing == -1)
        warn_narrowing = 1;
index 8f48d84..e244a6d 100644 (file)
@@ -312,11 +312,10 @@ C ObjC Var(warn_cxx_compat) CPP(warn_cxx_operator_names) CppReason(CPP_W_CXX_OPE
 Warn about C constructs that are not in the common subset of C and C++
 
 Wc++0x-compat
-C++ ObjC++ Var(warn_cxx0x_compat) Warning LangEnabledBy(C++ ObjC++,Wall) Init(0) CPP(cpp_warn_cxx11_compat) CppReason(CPP_W_CXX11_COMPAT)
-Deprecated in favor of -Wc++11-compat
+C++ ObjC++ Warning Alias(Wc++11-compat) Undocumented
 
 Wc++11-compat
-C++ ObjC++ Warning Alias(Wc++0x-compat)
+C++ ObjC++ Var(warn_cxx11_compat) Warning LangEnabledBy(C++ ObjC++,Wall) Init(0) CPP(cpp_warn_cxx11_compat) CppReason(CPP_W_CXX11_COMPAT)
 Warn about C++ constructs whose meaning differs between ISO C++ 1998 and ISO C++ 2011
 
 Wc++14-compat
@@ -627,7 +626,7 @@ C ObjC C++ ObjC++ CPP(warn_multichar) CppReason(CPP_W_MULTICHAR) Var(cpp_warn_mu
 Warn about use of multi-character character constants
 
 Wnarrowing
-C ObjC C++ ObjC++ Warning Var(warn_narrowing) Init(-1) LangEnabledBy(C++ ObjC++,Wall || Wc++0x-compat)
+C ObjC C++ ObjC++ Warning Var(warn_narrowing) Init(-1) LangEnabledBy(C++ ObjC++,Wall || Wc++11-compat)
 Warn about narrowing conversions within { } that are ill-formed in C++11
 
 Wnested-externs
index 0910549..e776b00 100644 (file)
@@ -1,5 +1,10 @@
 2015-05-08  Jason Merrill  <jason@redhat.com>
 
+       * cp-gimplify.c, parser.c: Adjust to -Wc++11-compat replacing
+       -Wc++0x-compat.
+
+2015-05-08  Jason Merrill  <jason@redhat.com>
+
        * decl2.c (mangling_aliases): New variable.
        (note_mangling_alias, generate_mangling_aliases): New.
        (cp_write_global_declarations): Call generate_mangling_aliases.
index 35749ef..d5a64fc 100644 (file)
@@ -1231,13 +1231,13 @@ cp_genericize_r (tree *stmt_p, int *walk_subtrees, void *data)
        }
       else
        {
-         if (warn_cxx0x_compat && cxx_dialect < cxx11
+         if (warn_cxx11_compat && cxx_dialect < cxx11
              && DECL_DESTRUCTOR_P (current_function_decl)
              && (TYPE_RAISES_EXCEPTIONS (TREE_TYPE (current_function_decl))
                  == NULL_TREE)
              && (get_defaulted_eh_spec (current_function_decl)
                  == empty_except_spec))
-           warning_at (loc, OPT_Wc__0x_compat,
+           warning_at (loc, OPT_Wc__11_compat,
                        "in C++11 this throw will terminate because "
                        "destructors default to noexcept");
        }
index 3d165da..6f746a1 100644 (file)
@@ -802,13 +802,13 @@ cp_lexer_get_preprocessor_token (cp_lexer *lexer, cp_token *token)
        }
       else
        {
-          if (warn_cxx0x_compat
+          if (warn_cxx11_compat
               && C_RID_CODE (token->u.value) >= RID_FIRST_CXX0X
               && C_RID_CODE (token->u.value) <= RID_LAST_CXX0X)
             {
               /* Warn about the C++0x keyword (but still treat it as
                  an identifier).  */
-              warning (OPT_Wc__0x_compat, 
+              warning (OPT_Wc__11_compat, 
                        "identifier %qE is a keyword in C++11",
                        token->u.value);
 
@@ -8162,11 +8162,11 @@ cp_parser_binary_expression (cp_parser* parser, bool cast_p,
       /* Get an operator token.  */
       token = cp_lexer_peek_token (parser->lexer);
 
-      if (warn_cxx0x_compat
+      if (warn_cxx11_compat
           && token->type == CPP_RSHIFT
           && !parser->greater_than_is_operator_p)
         {
-          if (warning_at (token->location, OPT_Wc__0x_compat,
+          if (warning_at (token->location, OPT_Wc__11_compat,
                          "%<>>%> operator is treated"
                          " as two right angle brackets in C++11"))
            inform (token->location,
@@ -11873,7 +11873,7 @@ cp_parser_decl_specifier_seq (cp_parser* parser,
 
               /* Complain about `auto' as a storage specifier, if
                  we're complaining about C++0x compatibility.  */
-              warning_at (token->location, OPT_Wc__0x_compat, "%<auto%>"
+              warning_at (token->location, OPT_Wc__11_compat, "%<auto%>"
                          " changes meaning in C++11; please remove it");
 
               /* Set the storage class anyway.  */