aboutsummaryrefslogtreecommitdiff
path: root/gcc/cp
diff options
context:
space:
mode:
authorJason Merrill <jason@redhat.com>2015-05-09 00:50:15 -0400
committerJason Merrill <jason@gcc.gnu.org>2015-05-09 00:50:15 -0400
commit765189ff60c25e93d65f8c202afc893ea8cef220 (patch)
treeb59d2738088b3f645d400b99f7c6f12dfeff9a7a /gcc/cp
parentfe191308ddc9bb7095d01bcd11dcaf1f38c84bab (diff)
downloadgcc-765189ff60c25e93d65f8c202afc893ea8cef220.zip
gcc-765189ff60c25e93d65f8c202afc893ea8cef220.tar.gz
gcc-765189ff60c25e93d65f8c202afc893ea8cef220.tar.bz2
c.opt (Wc++11-compat): Make primary.
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
Diffstat (limited to 'gcc/cp')
-rw-r--r--gcc/cp/ChangeLog5
-rw-r--r--gcc/cp/cp-gimplify.c4
-rw-r--r--gcc/cp/parser.c10
3 files changed, 12 insertions, 7 deletions
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog
index 0910549..e776b00 100644
--- a/gcc/cp/ChangeLog
+++ b/gcc/cp/ChangeLog
@@ -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.
diff --git a/gcc/cp/cp-gimplify.c b/gcc/cp/cp-gimplify.c
index 35749ef..d5a64fc 100644
--- a/gcc/cp/cp-gimplify.c
+++ b/gcc/cp/cp-gimplify.c
@@ -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");
}
diff --git a/gcc/cp/parser.c b/gcc/cp/parser.c
index 3d165da..6f746a1 100644
--- a/gcc/cp/parser.c
+++ b/gcc/cp/parser.c
@@ -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. */