From 9b6ab3c0591fd583915861cfd1d27183873221e8 Mon Sep 17 00:00:00 2001 From: Paolo Carlini Date: Wed, 19 Oct 2011 12:46:42 +0000 Subject: re PR c++/38761 (%s substituted with regular word can't be properly translated) 2011-10-19 Paolo Carlini PR c++/38761 PR c++/40872 * decl.c (duplicate_decls, make_typename_type, grokdeclarator): Use G_() in error message strings to facilitate translation. * semantics.c (finish_id_expression): Likewise. * parser.c (cp_parser_nested_name_specifier_opt, cp_parser_parameter_declaration): Likewise. From-SVN: r180185 --- gcc/cp/parser.c | 23 +++++++++++++---------- 1 file changed, 13 insertions(+), 10 deletions(-) (limited to 'gcc/cp/parser.c') diff --git a/gcc/cp/parser.c b/gcc/cp/parser.c index a237b87..8d138fb 100644 --- a/gcc/cp/parser.c +++ b/gcc/cp/parser.c @@ -4752,8 +4752,8 @@ cp_parser_nested_name_specifier_opt (cp_parser *parser, && (TREE_CODE (TYPENAME_TYPE_FULLNAME (new_scope)) == TEMPLATE_ID_EXPR))) permerror (input_location, TYPE_P (new_scope) - ? "%qT is not a template" - : "%qD is not a template", + ? G_("%qT is not a template") + : G_("%qD is not a template"), new_scope); /* If it is a class scope, try to complete it; we are about to be looking up names inside the class. */ @@ -16810,17 +16810,20 @@ cp_parser_parameter_declaration (cp_parser *parser, if (id_declarator && id_declarator->kind == cdk_id) error_at (declarator_token_start->location, - template_parm_p - ? "template parameter pack %qD" - " cannot have a default argument" - : "parameter pack %qD cannot have a default argument", + template_parm_p + ? G_("template parameter pack %qD " + "cannot have a default argument") + : G_("parameter pack %qD cannot have " + "a default argument"), id_declarator->u.id.unqualified_name); else error_at (declarator_token_start->location, - template_parm_p - ? "template parameter pack cannot have a default argument" - : "parameter pack cannot have a default argument"); - + template_parm_p + ? G_("template parameter pack cannot have " + "a default argument") + : G_("parameter pack cannot have a " + "default argument")); + default_argument = NULL_TREE; } } -- cgit v1.1