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>
{
/* 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;
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
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
+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.
}
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");
}
}
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);
/* 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,
/* 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. */