aboutsummaryrefslogtreecommitdiff
path: root/gcc/c
diff options
context:
space:
mode:
authorJakub Jelinek <jakub@redhat.com>2017-02-28 16:25:19 +0100
committerJakub Jelinek <jakub@gcc.gnu.org>2017-02-28 16:25:19 +0100
commit324ff1a07f9ddde87f91acfa7b16a3c24ba6895c (patch)
tree68c599de8fbc088feb2c6b53509d06af0157d3e0 /gcc/c
parentc5c78a527d98118e8ee8a098627a3f3f00307bd2 (diff)
downloadgcc-324ff1a07f9ddde87f91acfa7b16a3c24ba6895c.zip
gcc-324ff1a07f9ddde87f91acfa7b16a3c24ba6895c.tar.gz
gcc-324ff1a07f9ddde87f91acfa7b16a3c24ba6895c.tar.bz2
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
Diffstat (limited to 'gcc/c')
-rw-r--r--gcc/c/ChangeLog9
-rw-r--r--gcc/c/c-parser.c21
2 files changed, 20 insertions, 10 deletions
diff --git a/gcc/c/ChangeLog b/gcc/c/ChangeLog
index 699def0..95cea17 100644
--- a/gcc/c/ChangeLog
+++ b/gcc/c/ChangeLog
@@ -1,3 +1,12 @@
+2017-02-28 Jakub Jelinek <jakub@redhat.com>
+
+ * 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.
+
2017-02-24 Jakub Jelinek <jakub@redhat.com>
PR c++/79588
diff --git a/gcc/c/c-parser.c b/gcc/c/c-parser.c
index 34585b9..c74b3cf 100644
--- a/gcc/c/c-parser.c
+++ b/gcc/c/c-parser.c
@@ -64,6 +64,7 @@ along with GCC; see the file COPYING3. If not see
#include "gimple-parser.h"
#include "read-rtl-function.h"
#include "run-rtl-passes.h"
+#include "intl.h"
/* We need to walk over decls with incomplete struct/union/enum types
after parsing the whole translation unit.
@@ -6159,8 +6160,8 @@ c_parser_asm_statement (c_parser *parser)
{
if (!c_parser_require (parser, CPP_COLON,
is_goto
- ? "expected %<:%>"
- : "expected %<:%> or %<)%>"))
+ ? G_("expected %<:%>")
+ : G_("expected %<:%> or %<)%>")))
goto error_close_paren;
/* Once past any colon, we're no longer a simple asm. */
@@ -13925,9 +13926,8 @@ c_parser_oacc_enter_exit_data (c_parser *parser, bool enter)
if (strcmp (p, "data") != 0)
{
- error_at (loc, enter
- ? "expected %<data%> after %<#pragma acc enter%>"
- : "expected %<data%> after %<#pragma acc exit%>");
+ error_at (loc, "expected %<data%> after %<#pragma acc %s%>",
+ enter ? "enter" : "exit");
parser->error = true;
c_parser_skip_to_pragma_eol (parser);
return;
@@ -13942,9 +13942,8 @@ c_parser_oacc_enter_exit_data (c_parser *parser, bool enter)
if (omp_find_clause (clauses, OMP_CLAUSE_MAP) == NULL_TREE)
{
- error_at (loc, enter
- ? "%<#pragma acc enter data%> has no data movement clause"
- : "%<#pragma acc exit data%> has no data movement clause");
+ error_at (loc, "%<#pragma acc %s data%> has no data movement clause",
+ enter ? "enter" : "exit");
return;
}
@@ -14270,8 +14269,10 @@ c_finish_oacc_routine (struct oacc_routine_data *data, tree fndecl,
if (TREE_USED (fndecl) || (!is_defn && DECL_SAVED_TREE (fndecl)))
{
error_at (data->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"));
data->error_seen = true;
return;
}