aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorJason Merrill <jason@redhat.com>2011-11-02 16:16:56 -0400
committerJason Merrill <jason@gcc.gnu.org>2011-11-02 16:16:56 -0400
commit8fbf5688fb7314c59ccd2774fd16f8d91ef56dd4 (patch)
tree23352eaed69de58c7389dcc51fb4fddc2ef89dd4 /gcc
parent25339f1097a119662a4989964f32143ad44edbd3 (diff)
downloadgcc-8fbf5688fb7314c59ccd2774fd16f8d91ef56dd4.zip
gcc-8fbf5688fb7314c59ccd2774fd16f8d91ef56dd4.tar.gz
gcc-8fbf5688fb7314c59ccd2774fd16f8d91ef56dd4.tar.bz2
parser.c (cp_parser_decl_specifier_seq): Change "C++0x" to "C++11" in warnings.
* parser.c (cp_parser_decl_specifier_seq): Change "C++0x" to "C++11" in warnings. (cp_lexer_get_preprocessor_token): Likewise. (cp_parser_binary_expression): Likewise. From-SVN: r180795
Diffstat (limited to 'gcc')
-rw-r--r--gcc/cp/ChangeLog7
-rw-r--r--gcc/cp/parser.c8
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/auto1.C6
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/bracket3.C6
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/warn_cxx0x.C6
5 files changed, 20 insertions, 13 deletions
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog
index 3e605e6..564203a 100644
--- a/gcc/cp/ChangeLog
+++ b/gcc/cp/ChangeLog
@@ -1,3 +1,10 @@
+2011-11-02 Jason Merrill <jason@redhat.com>
+
+ * parser.c (cp_parser_decl_specifier_seq): Change "C++0x" to
+ "C++11" in warnings.
+ (cp_lexer_get_preprocessor_token): Likewise.
+ (cp_parser_binary_expression): Likewise.
+
2011-11-02 Paolo Carlini <paolo.carlini@oracle.com>
PR c++/50810
diff --git a/gcc/cp/parser.c b/gcc/cp/parser.c
index 63f9262..e543e87 100644
--- a/gcc/cp/parser.c
+++ b/gcc/cp/parser.c
@@ -744,7 +744,7 @@ cp_lexer_get_preprocessor_token (cp_lexer *lexer, cp_token *token)
/* Warn about the C++0x keyword (but still treat it as
an identifier). */
warning (OPT_Wc__0x_compat,
- "identifier %qE will become a keyword in C++0x",
+ "identifier %qE is a keyword in C++11",
token->u.value);
/* Clear out the C_RID_CODE so we don't warn about this
@@ -7198,8 +7198,8 @@ cp_parser_binary_expression (cp_parser* parser, bool cast_p,
&& !parser->greater_than_is_operator_p)
{
if (warning_at (token->location, OPT_Wc__0x_compat,
- "%<>>%> operator will be treated as"
- " two right angle brackets in C++0x"))
+ "%<>>%> operator is treated as"
+ " two right angle brackets in C++11"))
inform (token->location,
"suggest parentheses around %<>>%> expression");
}
@@ -10528,7 +10528,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%>"
- " will change meaning in C++0x; please remove it");
+ " changes meaning in C++11; please remove it");
/* Set the storage class anyway. */
cp_parser_set_storage_class (parser, decl_specs, RID_AUTO,
diff --git a/gcc/testsuite/g++.dg/cpp0x/auto1.C b/gcc/testsuite/g++.dg/cpp0x/auto1.C
index 9e274b6..f5c0ea6 100644
--- a/gcc/testsuite/g++.dg/cpp0x/auto1.C
+++ b/gcc/testsuite/g++.dg/cpp0x/auto1.C
@@ -1,8 +1,8 @@
-// { dg-options "-std=c++98 -Wc++0x-compat" }
+// { dg-options "-std=c++98 -Wc++11-compat" }
-// Test warning for use of auto in C++98 mode with C++0x
+// Test warning for use of auto in C++98 mode with C++11
// compatibility warnings
void f()
{
- auto int x = 5; // { dg-warning "will change meaning" }
+ auto int x = 5; // { dg-warning "changes meaning" }
}
diff --git a/gcc/testsuite/g++.dg/cpp0x/bracket3.C b/gcc/testsuite/g++.dg/cpp0x/bracket3.C
index 4ef7a0e..f86aa04 100644
--- a/gcc/testsuite/g++.dg/cpp0x/bracket3.C
+++ b/gcc/testsuite/g++.dg/cpp0x/bracket3.C
@@ -1,10 +1,10 @@
-// { dg-options "-std=c++98 -Wc++0x-compat" }
+// { dg-options "-std=c++98 -Wc++11-compat" }
template<int N> struct X {};
-X<1 >> 2> x; // { dg-warning "will be treated as|suggest parentheses" }
+X<1 >> 2> x; // { dg-warning "is treated as|suggest parentheses" }
// From cp/parser.c
typedef int Y;
template <int V> struct Foo {};
-Foo<Y () >> 5> r; // { dg-warning "will be treated as|suggest parentheses" }
+Foo<Y () >> 5> r; // { dg-warning "is treated as|suggest parentheses" }
diff --git a/gcc/testsuite/g++.dg/cpp0x/warn_cxx0x.C b/gcc/testsuite/g++.dg/cpp0x/warn_cxx0x.C
index 5ad9b61..5c5eeff 100644
--- a/gcc/testsuite/g++.dg/cpp0x/warn_cxx0x.C
+++ b/gcc/testsuite/g++.dg/cpp0x/warn_cxx0x.C
@@ -1,6 +1,6 @@
-// { dg-options "-std=gnu++98 -Wc++0x-compat" }
-int static_assert; // { dg-warning "will become a keyword" }
-int nullptr; // { dg-warning "will become a keyword" }
+// { dg-options "-std=gnu++98 -Wc++11-compat" }
+int static_assert; // { dg-warning "is a keyword" }
+int nullptr; // { dg-warning "is a keyword" }
void foo()
{