diff options
author | Shujing Zhao <pearly.zhao@oracle.com> | 2009-11-18 11:36:00 +0000 |
---|---|---|
committer | Paolo Carlini <paolo@gcc.gnu.org> | 2009-11-18 11:36:00 +0000 |
commit | 848f237b0d51efe763c65723b05cd437cc7af632 (patch) | |
tree | 7036ec08c88d6e80941c5ee33f0aeb272eecb880 /gcc/cp/decl.c | |
parent | 7b98c16f7ae55a9e74e93aeadfc7e3c456dd6a01 (diff) | |
download | gcc-848f237b0d51efe763c65723b05cd437cc7af632.zip gcc-848f237b0d51efe763c65723b05cd437cc7af632.tar.gz gcc-848f237b0d51efe763c65723b05cd437cc7af632.tar.bz2 |
re PR c++/40892 (maybe_warn_cpp0x i18n problems)
/cp
2009-11-18 Shujing Zhao <pearly.zhao@oracle.com>
PR c++/40892
* error.c (maybe_warn_cpp0x): Accept enum cpp0x_warn_str as argument.
(maybe_warn_variadic_templates): Update the maybe_warn_cpp0x calls to
match the new declaration.
* cp-tree.h (cpp0x_warn_str): New type.
(maybe_warn_cpp0x): Adjust prototype with new argument.
* call.c (reference_binding): Update the maybe_warn_cpp0x calls.
* decl.c (reshape_init_r, check_initializer, grokdeclarator):
Likewise.
* parser.c (cp_parser_primary_expression)
(cp_parser_parenthesized_expression_list, cp_parser_new_initializer)
(cp_parser_assignment_expression, cp_parser_condition)
(cp_parser_jump_statement, cp_parser_mem_initializer)
(cp_parser_simple_type_specifier, cp_parser_elaborated_type_specifier)
(cp_parser_enum_specifier, cp_parser_initializer)
(cp_parser_pure_specifier, cp_parser_functional_cast): Likewise.
/testsuite
2009-11-18 Shujing Zhao <pearly.zhao@oracle.com>
* g++.old-deja/g++.other/crash28.C: Make expected dg-error strings
explicit.
* g++.dg/inherit/error4.C: Likewise.
* g++.dg/template/crash90.C: Likewise.
From-SVN: r154288
Diffstat (limited to 'gcc/cp/decl.c')
-rw-r--r-- | gcc/cp/decl.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/gcc/cp/decl.c b/gcc/cp/decl.c index f57efb7..599b39a 100644 --- a/gcc/cp/decl.c +++ b/gcc/cp/decl.c @@ -4929,7 +4929,7 @@ reshape_init_r (tree type, reshape_iter *d, bool first_initializer_p) init = error_mark_node; } else - maybe_warn_cpp0x ("extended initializer lists"); + maybe_warn_cpp0x (CPP0X_INITIALIZER_LISTS); } d->cur++; @@ -5173,7 +5173,7 @@ check_initializer (tree decl, tree init, int flags, tree *cleanup) { if (init_len == 0) { - maybe_warn_cpp0x ("extended initializer lists"); + maybe_warn_cpp0x (CPP0X_INITIALIZER_LISTS); init = build_zero_init (type, NULL_TREE, false); } else if (init_len != 1) @@ -8526,7 +8526,7 @@ grokdeclarator (const cp_declarator *declarator, { if (explicitp == 1) { - maybe_warn_cpp0x ("explicit conversion operators"); + maybe_warn_cpp0x (CPP0X_EXPLICIT_CONVERSION); explicitp = 2; } } |