From 324ff1a07f9ddde87f91acfa7b16a3c24ba6895c Mon Sep 17 00:00:00 2001 From: Jakub Jelinek Date: Tue, 28 Feb 2017 16:25:19 +0100 Subject: i386.c: Include intl.h. * config/i386/i386.c: Include intl.h. (ix86_option_override_internal): Use cond ? G_("...") : G_("...") instead of just cond ? "..." : "...". * config/nvptx/nvptx.c (nvptx_goacc_validate_dims): Likewise. * coverage.c (read_counts_file): Likewise. * omp-offload.c: Include intl.h. (oacc_loop_fixed_partitions): Use cond ? G_("...") : G_("...") instead of just cond ? "..." : "...". * gcov.c (read_count_file): Use cond ? N_("...") : N_("...") instead of just cond ? "..." : "...". c/ * c-parser.c (c_parser_asm_statement): Use cond ? G_("...") : G_("...") instead of just cond ? "..." : "...". (c_parser_oacc_enter_exit_data): Use %s and ternary operator only for "enter"/"exit" keyword. (c_finish_oacc_routine): Don't use %s to supply portions of the message. cp/ * decl.c (find_decomp_class_base): Use cond ? G_("...") : G_("...") instead of just cond ? "..." : "...". (grokdeclarator): Likewise. (build_enumerator): Likewise. * init.c (build_new_1): Likewise. * call.c (build_new_method_call_1): Likewise. * parser.c: Include intl.h. (cp_parser_oacc_enter_exit_data): Use %s and ternary operator only for "enter"/"exit" keyword. (cp_finalize_oacc_routine): Don't use %s to supply portions of the message. fortran/ * parse.c (parse_critical_block): Use cond ? G_("...") : G_("...") instead of just cond ? "..." : "...". * scanner.c (gfc_next_char_literal): Likewise. * match.c (match_exit_cycle): Likewise. From-SVN: r245778 --- gcc/cp/ChangeLog | 14 ++++++++++++++ gcc/cp/call.c | 4 ++-- gcc/cp/decl.c | 16 +++++++++------- gcc/cp/init.c | 4 ++-- gcc/cp/parser.c | 11 ++++++----- 5 files changed, 33 insertions(+), 16 deletions(-) (limited to 'gcc/cp') diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index 5792e5d..e62bdb3 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,3 +1,17 @@ +2017-02-28 Jakub Jelinek + + * decl.c (find_decomp_class_base): Use cond ? G_("...") : G_("...") + instead of just cond ? "..." : "...". + (grokdeclarator): Likewise. + (build_enumerator): Likewise. + * init.c (build_new_1): Likewise. + * call.c (build_new_method_call_1): Likewise. + * parser.c: Include intl.h. + (cp_parser_oacc_enter_exit_data): Use %s and ternary operator only for + "enter"/"exit" keyword. + (cp_finalize_oacc_routine): Don't use %s to supply portions of the + message. + 2017-02-27 Jason Merrill PR c++/71568 - SFINAE forming pointer to member function diff --git a/gcc/cp/call.c b/gcc/cp/call.c index dd09049..560804a 100644 --- a/gcc/cp/call.c +++ b/gcc/cp/call.c @@ -8772,8 +8772,8 @@ build_new_method_call_1 (tree instance, tree fns, vec **args, else if (DECL_CONSTRUCTOR_P (current_function_decl) || DECL_DESTRUCTOR_P (current_function_decl)) warning (0, (DECL_CONSTRUCTOR_P (current_function_decl) - ? "pure virtual %q#D called from constructor" - : "pure virtual %q#D called from destructor"), + ? G_("pure virtual %q#D called from constructor") + : G_("pure virtual %q#D called from destructor")), fn); } diff --git a/gcc/cp/decl.c b/gcc/cp/decl.c index 828359f..54cbbb7 100644 --- a/gcc/cp/decl.c +++ b/gcc/cp/decl.c @@ -7224,8 +7224,9 @@ find_decomp_class_base (location_t loc, tree type, tree ret) error_at (loc, "cannot decompose non-public member %qD of %qT", field, type); inform (DECL_SOURCE_LOCATION (field), - TREE_PRIVATE (field) ? "declared private here" - : "declared protected here"); + TREE_PRIVATE (field) + ? G_("declared private here") + : G_("declared protected here")); return error_mark_node; } else @@ -11001,8 +11002,8 @@ grokdeclarator (const cp_declarator *declarator, { maybe_warn_cpp0x (CPP0X_REF_QUALIFIER); error ((flags == DTOR_FLAG) - ? "destructors may not be ref-qualified" - : "constructors may not be ref-qualified"); + ? G_("destructors may not be ref-qualified") + : G_("constructors may not be ref-qualified")); rqual = REF_QUAL_NONE; } @@ -14484,9 +14485,10 @@ build_enumerator (tree name, tree value, tree enumtype, tree attributes, } if (type && cxx_dialect < cxx11 && itk > itk_unsigned_long) - pedwarn (input_location, OPT_Wlong_long, pos ? "\ -incremented enumerator value is too large for %" : "\ -incremented enumerator value is too large for %"); + pedwarn (input_location, OPT_Wlong_long, + pos ? G_("\ +incremented enumerator value is too large for %") : G_("\ +incremented enumerator value is too large for %")); } if (type == NULL_TREE) overflowed = true; diff --git a/gcc/cp/init.c b/gcc/cp/init.c index 99eeb8a..5520963 100644 --- a/gcc/cp/init.c +++ b/gcc/cp/init.c @@ -2811,8 +2811,8 @@ build_new_1 (vec **placement, tree type, tree nelts, { pedwarn (EXPR_LOC_OR_LOC (outer_nelts, input_location), OPT_Wvla, typedef_variant_p (orig_type) - ? "non-constant array new length must be specified " - "directly, not by typedef" + ? G_("non-constant array new length must be specified " + "directly, not by typedef") : G_("non-constant array new length must be specified " "without parentheses around the type-id")); } diff --git a/gcc/cp/parser.c b/gcc/cp/parser.c index 65feca3..50528e2 100644 --- a/gcc/cp/parser.c +++ b/gcc/cp/parser.c @@ -36293,9 +36293,8 @@ cp_parser_oacc_enter_exit_data (cp_parser *parser, cp_token *pragma_tok, if (strcmp (p, "data") != 0) { - error_at (loc, enter - ? "expected % after %<#pragma acc enter%>" - : "expected % after %<#pragma acc exit%>"); + error_at (loc, "expected % after %<#pragma acc %s%>", + enter ? "enter" : "exit"); cp_parser_skip_to_pragma_eol (parser, pragma_tok); return NULL_TREE; } @@ -37573,8 +37572,10 @@ cp_finalize_oacc_routine (cp_parser *parser, tree fndecl, bool is_defn) if (TREE_USED (fndecl) || (!is_defn && DECL_SAVED_TREE (fndecl))) { error_at (parser->oacc_routine->loc, - "%<#pragma acc routine%> must be applied before %s", - TREE_USED (fndecl) ? "use" : "definition"); + TREE_USED (fndecl) + ? G_("%<#pragma acc routine%> must be applied before use") + : G_("%<#pragma acc routine%> must be applied before " + "definition")); parser->oacc_routine = NULL; return; } -- cgit v1.1