diff options
-rw-r--r-- | contrib/ChangeLog | 6 | ||||
-rwxr-xr-x | contrib/check-internal-format-escaping.py | 2 | ||||
-rw-r--r-- | gcc/ChangeLog | 37 | ||||
-rw-r--r-- | gcc/collect-utils.c | 2 | ||||
-rw-r--r-- | gcc/collect2.c | 10 | ||||
-rw-r--r-- | gcc/common/config/riscv/riscv-common.c | 12 | ||||
-rw-r--r-- | gcc/config/aarch64/aarch64.c | 4 | ||||
-rw-r--r-- | gcc/config/arm/arm.c | 2 | ||||
-rw-r--r-- | gcc/config/cris/cris.c | 2 | ||||
-rw-r--r-- | gcc/config/darwin-c.c | 24 | ||||
-rw-r--r-- | gcc/config/ft32/ft32.c | 2 | ||||
-rw-r--r-- | gcc/config/i386/i386.c | 4 | ||||
-rw-r--r-- | gcc/config/i386/xm-djgpp.h | 4 | ||||
-rw-r--r-- | gcc/config/iq2000/iq2000.c | 2 | ||||
-rw-r--r-- | gcc/config/m32c/m32c.c | 2 | ||||
-rw-r--r-- | gcc/config/msp430/msp430.c | 18 | ||||
-rw-r--r-- | gcc/config/nds32/nds32.c | 6 | ||||
-rw-r--r-- | gcc/config/nvptx/mkoffload.c | 2 | ||||
-rw-r--r-- | gcc/config/rx/rx.c | 7 | ||||
-rw-r--r-- | gcc/config/vms/vms-c.c | 15 | ||||
-rw-r--r-- | gcc/lto-wrapper.c | 4 | ||||
-rw-r--r-- | gcc/objc/ChangeLog | 7 | ||||
-rw-r--r-- | gcc/objc/objc-act.c | 18 | ||||
-rw-r--r-- | gcc/omp-offload.c | 2 | ||||
-rw-r--r-- | gcc/symtab.c | 2 | ||||
-rw-r--r-- | gcc/tlink.c | 4 | ||||
-rw-r--r-- | gcc/tree-profile.c | 2 |
27 files changed, 130 insertions, 72 deletions
diff --git a/contrib/ChangeLog b/contrib/ChangeLog index 74e9592..9996d33 100644 --- a/contrib/ChangeLog +++ b/contrib/ChangeLog @@ -1,3 +1,9 @@ +2019-04-05 Martin Liska <mliska@suse.cz> + + PR translation/89935 + * check-internal-format-escaping.py: Properly detect wrong + apostrophes. + 2019-03-11 Martin Liska <mliska@suse.cz> * check-internal-format-escaping.py: Uncomment apostrophes diff --git a/contrib/check-internal-format-escaping.py b/contrib/check-internal-format-escaping.py index 5da56b5..aac4f9e 100755 --- a/contrib/check-internal-format-escaping.py +++ b/contrib/check-internal-format-escaping.py @@ -56,7 +56,7 @@ for i, l in enumerate(lines): print('%s: %s' % (origin, text)) elif p.startswith('__builtin_'): print('%s: %s' % (origin, text)) - if re.search("[a-zA-Z]'[a-zA-Z]", p): + if re.search("[^%]'", p): print('%s: %s' % (origin, text)) j += 1 diff --git a/gcc/ChangeLog b/gcc/ChangeLog index c4693bf..a7f66a9 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,40 @@ +2019-04-05 Martin Liska <mliska@suse.cz> + + PR translation/89935 + * collect-utils.c (collect_execute): Use %< and %>, or %qs in + order to wrap keywords or arguments. + * collect2.c (main): Likewise. + (scan_prog_file): Likewise. + (scan_libraries): Likewise. + * common/config/riscv/riscv-common.c (riscv_subset_list::parsing_subset_version): Likewise. + (riscv_subset_list::parse_std_ext): Likewise. + * config/aarch64/aarch64.c (aarch64_override_options_internal): Likewise. + * config/arm/arm.c (arm_option_override): Likewise. + * config/cris/cris.c (cris_print_operand): Likewise. + * config/darwin-c.c (darwin_pragma_options): Likewise. + (darwin_pragma_unused): Likewise. + (darwin_pragma_ms_struct): Likewise. + * config/ft32/ft32.c (ft32_print_operand): Likewise. + * config/i386/i386.c (print_reg): Likewise. + (ix86_print_operand): Likewise. + * config/i386/xm-djgpp.h: Likewise. + * config/iq2000/iq2000.c (iq2000_print_operand): Likewise. + * config/m32c/m32c.c (m32c_option_override): Likewise. + * config/msp430/msp430.c (msp430_option_override): Likewise. + * config/nds32/nds32.c (nds32_option_override): Likewise. + * config/nvptx/mkoffload.c (main): Likewise. + * config/rx/rx.c (rx_print_operand): Likewise. + (valid_psw_flag): Likewise. + * config/vms/vms-c.c (vms_pragma_member_alignment): Likewise. + (vms_pragma_nomember_alignment): Likewise. + (vms_pragma_extern_model): Likewise. + * lto-wrapper.c (compile_offload_image): Likewise. + * omp-offload.c (oacc_parse_default_dims): Likewise. + * symtab.c (symtab_node::verify_base): Likewise. + * tlink.c (recompile_files): Likewise. + (start_tweaking): Likewise. + * tree-profile.c (parse_profile_filter): Likewise. + 2019-04-05 Richard Sandiford <richard.sandiford@arm.com> PR tree-optimization/89956 diff --git a/gcc/collect-utils.c b/gcc/collect-utils.c index 1e03443..1b1b27c 100644 --- a/gcc/collect-utils.c +++ b/gcc/collect-utils.c @@ -176,7 +176,7 @@ collect_execute (const char *prog, char **argv, const char *outname, since we might not end up needing something that we could not find. */ if (argv[0] == 0) - fatal_error (input_location, "cannot find '%s'", prog); + fatal_error (input_location, "cannot find %qs", prog); pex = pex_init (0, "collect2", NULL); if (pex == NULL) diff --git a/gcc/collect2.c b/gcc/collect2.c index 9d7de94..25d4931 100644 --- a/gcc/collect2.c +++ b/gcc/collect2.c @@ -1516,7 +1516,7 @@ main (int argc, char **argv) enum demangling_styles style = cplus_demangle_name_to_style (arg+11); if (style == unknown_demangling) - error ("unknown demangling style '%s'", arg+11); + error ("unknown demangling style %qs", arg+11); else current_demangling_style = style; } @@ -2422,7 +2422,7 @@ scan_prog_file (const char *prog_name, scanpass which_pass, /* If we do not have an `nm', complain. */ if (nm_file_name == 0) - fatal_error (input_location, "cannot find 'nm'"); + fatal_error (input_location, "cannot find %<nm%>"); nm_argv[argc++] = nm_file_name; if (NM_FLAGS[0] != '\0') @@ -2593,7 +2593,7 @@ scan_libraries (const char *prog_name) /* If we do not have an `ldd', complain. */ if (ldd_file_name == 0) { - error ("cannot find 'ldd'"); + error ("cannot find %<ldd%>"); return; } @@ -2669,8 +2669,8 @@ scan_libraries (const char *prog_name) if (access (name, R_OK) == 0) add_to_list (&libraries, name); else - fatal_error (input_location, "unable to open dynamic dependency '%s'", - buf); + fatal_error (input_location, "unable to open dynamic dependency " + "%qs", buf); if (debug) fprintf (stderr, "\t%s\n", buf); diff --git a/gcc/common/config/riscv/riscv-common.c b/gcc/common/config/riscv/riscv-common.c index 9452bd3..eeb7571 100644 --- a/gcc/common/config/riscv/riscv-common.c +++ b/gcc/common/config/riscv/riscv-common.c @@ -250,8 +250,8 @@ riscv_subset_list::parsing_subset_version (const char *p, } else { - error_at (m_loc, "%<-march=%s%>: Expect number after `%dp'.", - m_arch, version); + error_at (m_loc, "%<-march=%s%>: Expect number " + "after %<%dp%>.", m_arch, version); return NULL; } } @@ -348,8 +348,8 @@ riscv_subset_list::parse_std_ext (const char *p) break; default: - error_at (m_loc, "%<-march=%s%>: first ISA subset must be `e', " - "`i' or `g'", m_arch); + error_at (m_loc, "%<-march=%s%>: first ISA subset must be %<e%>, " + "%<i%> or %<g%>", m_arch); return NULL; } @@ -375,12 +375,12 @@ riscv_subset_list::parse_std_ext (const char *p) if (std_ext != *std_exts) { if (strchr (all_std_exts, std_ext) == NULL) - error_at (m_loc, "%<-march=%s%>: unsupported ISA subset `%c'", + error_at (m_loc, "%<-march=%s%>: unsupported ISA subset %<%c%>", m_arch, *p); else error_at (m_loc, "%<-march=%s%>: ISA string is not in canonical order. " - "`%c'", m_arch, *p); + "%<%c%>", m_arch, *p); return NULL; } diff --git a/gcc/config/aarch64/aarch64.c b/gcc/config/aarch64/aarch64.c index b38505b..95e5b03 100644 --- a/gcc/config/aarch64/aarch64.c +++ b/gcc/config/aarch64/aarch64.c @@ -11575,8 +11575,8 @@ aarch64_override_options_internal (struct gcc_options *opts) int probe_interval = PARAM_VALUE (PARAM_STACK_CLASH_PROTECTION_PROBE_INTERVAL); if (guard_size != probe_interval) - error ("stack clash guard size '%d' must be equal to probing interval " - "'%d'", guard_size, probe_interval); + error ("stack clash guard size %<%d%> must be equal to probing interval " + "%<%d%>", guard_size, probe_interval); /* Enable sw prefetching at specified optimization level for CPUS that have prefetch. Lower optimization level threshold by 1 diff --git a/gcc/config/arm/arm.c b/gcc/config/arm/arm.c index 67f1a9c..7ce063f 100644 --- a/gcc/config/arm/arm.c +++ b/gcc/config/arm/arm.c @@ -3499,7 +3499,7 @@ arm_option_override (void) || pic_register >= PC_REGNUM || (TARGET_VXWORKS_RTP && (unsigned int) pic_register != arm_pic_register)) - error ("unable to use '%s' for PIC register", arm_pic_register_string); + error ("unable to use %qs for PIC register", arm_pic_register_string); else arm_pic_register = pic_register; } diff --git a/gcc/config/cris/cris.c b/gcc/config/cris/cris.c index 591941b..95bc004 100644 --- a/gcc/config/cris/cris.c +++ b/gcc/config/cris/cris.c @@ -903,7 +903,7 @@ cris_print_operand (FILE *file, rtx x, int code) case ':': /* The PIC register. */ if (! flag_pic) - internal_error ("invalid use of ':' modifier"); + internal_error ("invalid use of %<:%> modifier"); fprintf (file, "$%s", reg_names [PIC_OFFSET_TABLE_REGNUM]); return; diff --git a/gcc/config/darwin-c.c b/gcc/config/darwin-c.c index d74d9a5..8331153 100644 --- a/gcc/config/darwin-c.c +++ b/gcc/config/darwin-c.c @@ -99,17 +99,17 @@ darwin_pragma_options (cpp_reader *pfile ATTRIBUTE_UNUSED) tree t, x; if (pragma_lex (&t) != CPP_NAME) - BAD ("malformed '#pragma options', ignoring"); + BAD ("malformed %<#pragma options%>, ignoring"); arg = IDENTIFIER_POINTER (t); if (strcmp (arg, "align")) - BAD ("malformed '#pragma options', ignoring"); + BAD ("malformed %<#pragma options%>, ignoring"); if (pragma_lex (&t) != CPP_EQ) - BAD ("malformed '#pragma options', ignoring"); + BAD ("malformed %<#pragma options%>, ignoring"); if (pragma_lex (&t) != CPP_NAME) - BAD ("malformed '#pragma options', ignoring"); + BAD ("malformed %<#pragma options%>, ignoring"); if (pragma_lex (&x) != CPP_EOF) - warning (OPT_Wpragmas, "junk at end of '#pragma options'"); + warning (OPT_Wpragmas, "junk at end of %<#pragma options%>"); arg = IDENTIFIER_POINTER (t); if (!strcmp (arg, "mac68k")) @@ -119,7 +119,7 @@ darwin_pragma_options (cpp_reader *pfile ATTRIBUTE_UNUSED) else if (!strcmp (arg, "reset")) pop_field_alignment (); else - BAD ("malformed '#pragma options align={mac68k|power|reset}', ignoring"); + BAD ("malformed %<#pragma options align={mac68k|power|reset}%>, ignoring"); } /* #pragma unused ([var {, var}*]) */ @@ -131,7 +131,7 @@ darwin_pragma_unused (cpp_reader *pfile ATTRIBUTE_UNUSED) int tok; if (pragma_lex (&x) != CPP_OPEN_PAREN) - BAD ("missing '(' after '#pragma unused', ignoring"); + BAD ("missing %<(%> after %<#pragma unused%>, ignoring"); while (1) { @@ -152,10 +152,10 @@ darwin_pragma_unused (cpp_reader *pfile ATTRIBUTE_UNUSED) } if (tok != CPP_CLOSE_PAREN) - BAD ("missing ')' after '#pragma unused', ignoring"); + BAD ("missing %<)%> after %<#pragma unused%>, ignoring"); if (pragma_lex (&x) != CPP_EOF) - BAD ("junk at end of '#pragma unused'"); + BAD ("junk at end of %<#pragma unused%>"); } /* Parse the ms_struct pragma. */ @@ -166,7 +166,7 @@ darwin_pragma_ms_struct (cpp_reader *pfile ATTRIBUTE_UNUSED) tree t; if (pragma_lex (&t) != CPP_NAME) - BAD ("malformed '#pragma ms_struct', ignoring"); + BAD ("malformed %<#pragma ms_struct%>, ignoring"); arg = IDENTIFIER_POINTER (t); if (!strcmp (arg, "on")) @@ -174,10 +174,10 @@ darwin_pragma_ms_struct (cpp_reader *pfile ATTRIBUTE_UNUSED) else if (!strcmp (arg, "off") || !strcmp (arg, "reset")) darwin_ms_struct = false; else - BAD ("malformed '#pragma ms_struct {on|off|reset}', ignoring"); + BAD ("malformed %<#pragma ms_struct {on|off|reset}%>, ignoring"); if (pragma_lex (&t) != CPP_EOF) - BAD ("junk at end of '#pragma ms_struct'"); + BAD ("junk at end of %<#pragma ms_struct%>"); } static struct frameworks_in_use { diff --git a/gcc/config/ft32/ft32.c b/gcc/config/ft32/ft32.c index 0f6817c..64b3172 100644 --- a/gcc/config/ft32/ft32.c +++ b/gcc/config/ft32/ft32.c @@ -178,7 +178,7 @@ ft32_print_operand (FILE * file, rtx x, int code) case 'h': if (GET_CODE (operand) != REG) - internal_error ("'h' applied to non-register operand"); + internal_error ("%<h%> applied to non-register operand"); fprintf (file, "%s", reg_names[REGNO (operand) + 1]); return; diff --git a/gcc/config/i386/i386.c b/gcc/config/i386/i386.c index a754494..57d5a7b 100644 --- a/gcc/config/i386/i386.c +++ b/gcc/config/i386/i386.c @@ -17632,7 +17632,7 @@ print_reg (rtx x, int code, FILE *file) if (GENERAL_REGNO_P (regno)) msize = GET_MODE_SIZE (word_mode); else - error ("'V' modifier on non-integer register"); + error ("%<V%> modifier on non-integer register"); } duplicated = code == 'd' && TARGET_AVX; @@ -17896,7 +17896,7 @@ ix86_print_operand (FILE *file, rtx x, int code) } if (GET_MODE_CLASS (GET_MODE (x)) == MODE_FLOAT) - warning (0, "non-integer operand used with operand code 'z'"); + warning (0, "non-integer operand used with operand code %<z%>"); /* FALLTHRU */ case 'Z': diff --git a/gcc/config/i386/xm-djgpp.h b/gcc/config/i386/xm-djgpp.h index 8ebc825..8cb8bc6 100644 --- a/gcc/config/i386/xm-djgpp.h +++ b/gcc/config/i386/xm-djgpp.h @@ -84,10 +84,10 @@ along with GCC; see the file COPYING3. If not see if (djgpp == NULL) \ fatal_error (UNKNOWN_LOCATION, "environment variable DJGPP not defined"); \ else if (access (djgpp, R_OK) == 0) \ - fatal_error (UNKNOWN_LOCATION, "environment variable DJGPP points to missing file '%s'", \ + fatal_error (UNKNOWN_LOCATION, "environment variable DJGPP points to missing file %qs", \ djgpp); \ else \ - fatal_error (UNKNOWN_LOCATION, "environment variable DJGPP points to corrupt file '%s'", \ + fatal_error (UNKNOWN_LOCATION, "environment variable DJGPP points to corrupt file %qs", \ djgpp); \ } \ } while (0) diff --git a/gcc/config/iq2000/iq2000.c b/gcc/config/iq2000/iq2000.c index 4bdbf11..c3be6fa 100644 --- a/gcc/config/iq2000/iq2000.c +++ b/gcc/config/iq2000/iq2000.c @@ -3099,7 +3099,7 @@ iq2000_print_operand (FILE *file, rtx op, int letter) break; default: - error ("PRINT_OPERAND: Unknown punctuation '%c'", letter); + error ("PRINT_OPERAND: Unknown punctuation %<%c%>", letter); break; } diff --git a/gcc/config/m32c/m32c.c b/gcc/config/m32c/m32c.c index dd66b8a..1a0d0c68 100644 --- a/gcc/config/m32c/m32c.c +++ b/gcc/config/m32c/m32c.c @@ -417,7 +417,7 @@ m32c_option_override (void) if (global_options_set.x_target_memregs) { if (target_memregs < 0 || target_memregs > 16) - error ("invalid target memregs value '%d'", target_memregs); + error ("invalid target memregs value %<%d%>", target_memregs); } else target_memregs = 16; diff --git a/gcc/config/msp430/msp430.c b/gcc/config/msp430/msp430.c index 48d16a4..020e980 100644 --- a/gcc/config/msp430/msp430.c +++ b/gcc/config/msp430/msp430.c @@ -797,14 +797,14 @@ msp430_option_override (void) if (msp430_warn_mcu) { if (target_cpu&& msp430x != xisa) - warning (0, "MCU '%s' supports %s ISA but %<-mcpu%> option " + warning (0, "MCU %qs supports %s ISA but %<-mcpu%> option " "is set to %s", target_mcu, xisa ? "430X" : "430", msp430x ? "430X" : "430"); if (msp430_mcu_data[i].hwmpy == 0 && msp430_hwmult_type != MSP430_HWMULT_AUTO && msp430_hwmult_type != MSP430_HWMULT_NONE) - warning (0, "MCU '%s' does not have hardware multiply " + warning (0, "MCU %qs does not have hardware multiply " "support, but %<-mhwmult%> is set to %s", target_mcu, msp430_hwmult_type == MSP430_HWMULT_SMALL ? "16-bit" @@ -812,15 +812,15 @@ msp430_option_override (void) else if (msp430_hwmult_type == MSP430_HWMULT_SMALL && msp430_mcu_data[i].hwmpy != 1 && msp430_mcu_data[i].hwmpy != 2 ) - warning (0, "MCU '%s' supports %s hardware multiply, " + warning (0, "MCU %qs supports %s hardware multiply, " "but %<-mhwmult%> is set to 16-bit", target_mcu, hwmult_name (msp430_mcu_data[i].hwmpy)); else if (msp430_hwmult_type == MSP430_HWMULT_LARGE && msp430_mcu_data[i].hwmpy != 4) - warning (0, "MCU '%s' supports %s hardware multiply, " + warning (0, "MCU %qs supports %s hardware multiply, " "but %<-mhwmult%> is set to 32-bit", target_mcu, hwmult_name (msp430_mcu_data[i].hwmpy)); else if (msp430_hwmult_type == MSP430_HWMULT_F5SERIES && msp430_mcu_data[i].hwmpy != 8) - warning (0, "MCU '%s' supports %s hardware multiply, " + warning (0, "MCU %qs supports %s hardware multiply, " "but %<-mhwmult%> is set to f5series", target_mcu, hwmult_name (msp430_mcu_data[i].hwmpy)); } @@ -837,14 +837,14 @@ msp430_option_override (void) { if (target_cpu == NULL) warning (0, - "Unrecognized MCU name '%s', assuming that it is " + "Unrecognized MCU name %qs, assuming that it is " "just a MSP430 with no hardware multiply.\n" "Use the %<-mcpu%> and %<-mhwmult%> options to " "set these explicitly.", target_mcu); else warning (0, - "Unrecognized MCU name '%s', assuming that it " + "Unrecognized MCU name %qs, assuming that it " "has no hardware multiply.\nUse the %<-mhwmult%> " "option to set this explicitly.", target_mcu); @@ -856,7 +856,7 @@ msp430_option_override (void) { if (msp430_warn_mcu) warning (0, - "Unrecognized MCU name '%s', assuming that it just " + "Unrecognized MCU name %qs, assuming that it just " "supports the MSP430 ISA.\nUse the %<-mcpu%> option " "to set the ISA explicitly.", target_mcu); @@ -864,7 +864,7 @@ msp430_option_override (void) msp430x = false; } else if (msp430_warn_mcu) - warning (0, "Unrecognized MCU name '%s'.", target_mcu); + warning (0, "Unrecognized MCU name %qs.", target_mcu); } } diff --git a/gcc/config/nds32/nds32.c b/gcc/config/nds32/nds32.c index f2723ea..fe5c260 100644 --- a/gcc/config/nds32/nds32.c +++ b/gcc/config/nds32/nds32.c @@ -4175,10 +4175,10 @@ nds32_option_override (void) { if (nds32_arch_option == ARCH_V3S || nds32_arch_option == ARCH_V3F) error ("Disable FPU ISA, " - "the ABI option must be enable '-mfloat-abi=soft'"); + "the ABI option must be enable %<-mfloat-abi=soft%>"); else - error ("'-mabi=2fp+' option only support when FPU available, " - "must be enable '-mext-fpu-sp' or '-mext-fpu-dp'"); + error ("%<-mabi=2fp+%> option only support when FPU available, " + "must be enable %<-mext-fpu-sp%> or %<-mext-fpu-dp%>"); } nds32_init_rtx_costs (); diff --git a/gcc/config/nvptx/mkoffload.c b/gcc/config/nvptx/mkoffload.c index 3770f72..e93a129 100644 --- a/gcc/config/nvptx/mkoffload.c +++ b/gcc/config/nvptx/mkoffload.c @@ -454,7 +454,7 @@ main (int argc, char **argv) if (!found) fatal_error (input_location, - "offload compiler %s not found (consider using '-B')", + "offload compiler %s not found (consider using %<-B%>)", GCC_INSTALL_NAME); /* We may be called with all the arguments stored in some file and diff --git a/gcc/config/rx/rx.c b/gcc/config/rx/rx.c index dac05db..f70e8f3 100644 --- a/gcc/config/rx/rx.c +++ b/gcc/config/rx/rx.c @@ -648,8 +648,8 @@ rx_print_operand (FILE * file, rtx op, int letter) case CTRLREG_FINTV: fprintf (file, "fintv"); break; case CTRLREG_INTB: fprintf (file, "intb"); break; default: - warning (0, "unrecognized control register number: %d - using 'psw'", - (int) INTVAL (op)); + warning (0, "unrecognized control register number: %d" + "- using %<psw%>", (int) INTVAL (op)); fprintf (file, "psw"); break; } @@ -2593,7 +2593,8 @@ valid_psw_flag (rtx op, const char *which) return 1; } - error ("%<__builtin_rx_%s%> takes 'C', 'Z', 'S', 'O', 'I', or 'U'", which); + error ("%<__builtin_rx_%s%> takes %<C%>, %<Z%>, %<S%>, %<O%>, %<I%>, " + "or %<U%>", which); if (!mvtc_inform_done) error ("use %<__builtin_rx_mvtc%> (0, ... ) to write arbitrary values to PSW"); mvtc_inform_done = 1; diff --git a/gcc/config/vms/vms-c.c b/gcc/config/vms/vms-c.c index 1e6b9f5..d2bdd04 100644 --- a/gcc/config/vms/vms-c.c +++ b/gcc/config/vms/vms-c.c @@ -77,7 +77,8 @@ vms_pragma_member_alignment (cpp_reader *pfile ATTRIBUTE_UNUSED) } if (tok != CPP_NAME) { - warning (OPT_Wpragmas, "malformed '#pragma member_alignment', ignoring"); + warning (OPT_Wpragmas, + "malformed %<#pragma member_alignment%>, ignoring"); return; } @@ -92,12 +93,12 @@ vms_pragma_member_alignment (cpp_reader *pfile ATTRIBUTE_UNUSED) maximum_field_alignment = saved_member_alignment; else { - error ("unknown '#pragma member_alignment' name %s", arg); + error ("unknown %<#pragma member_alignment%> name %s", arg); return; } if (pragma_lex (&x) != CPP_EOF) { - error ("malformed '#pragma member_alignment'"); + error ("malformed %<#pragma member_alignment%>"); return; } } @@ -131,7 +132,7 @@ vms_pragma_nomember_alignment (cpp_reader *pfile ATTRIBUTE_UNUSED) maximum_field_alignment = 16 * BITS_PER_UNIT; else { - error ("unhandled alignment for '#pragma nomember_alignment'"); + error ("unhandled alignment for %<#pragma nomember_alignment%>"); } tok = pragma_lex (&x); @@ -144,7 +145,7 @@ vms_pragma_nomember_alignment (cpp_reader *pfile ATTRIBUTE_UNUSED) if (tok != CPP_EOF) { - error ("garbage at end of '#pragma nomember_alignment'"); + error ("garbage at end of %<#pragma nomember_alignment%>"); return; } } @@ -199,7 +200,7 @@ vms_pragma_extern_model (cpp_reader *pfile ATTRIBUTE_UNUSED) if (tok != CPP_NAME) { - warning (OPT_Wpragmas, "malformed '#pragma extern_model', ignoring"); + warning (OPT_Wpragmas, "malformed %<#pragma extern_model%>, ignoring"); return; } @@ -225,7 +226,7 @@ vms_pragma_extern_model (cpp_reader *pfile ATTRIBUTE_UNUSED) } else { - error ("unknown '#pragma extern_model' model '%s'", arg); + error ("unknown %<#pragma extern_model%> model %qs", arg); return; } #if 0 diff --git a/gcc/lto-wrapper.c b/gcc/lto-wrapper.c index 8c84aea..56eea90 100644 --- a/gcc/lto-wrapper.c +++ b/gcc/lto-wrapper.c @@ -822,8 +822,8 @@ compile_offload_image (const char *target, const char *compiler_path, if (!compiler) fatal_error (input_location, - "could not find %s in %s (consider using '-B')\n", suffix + 1, - compiler_path); + "could not find %s in %s (consider using %<-B%>)\n", + suffix + 1, compiler_path); /* Generate temporary output file name. */ filename = make_temp_file (".target.o"); diff --git a/gcc/objc/ChangeLog b/gcc/objc/ChangeLog index aa81466..0fdebda 100644 --- a/gcc/objc/ChangeLog +++ b/gcc/objc/ChangeLog @@ -1,3 +1,10 @@ +2019-04-05 Martin Liska <mliska@suse.cz> + + PR translation/89935 + * objc-act.c (objc_add_property_declaration): Use %< and %>, or %qs in + order to wrap keywords or arguments. + (objc_add_synthesize_declaration_for_property): Likewise. + 2019-01-09 Sandra Loosemore <sandra@codesourcery.com> PR other/16615 diff --git a/gcc/objc/objc-act.c b/gcc/objc/objc-act.c index 777225e..5cf7205 100644 --- a/gcc/objc/objc-act.c +++ b/gcc/objc/objc-act.c @@ -1090,7 +1090,8 @@ objc_add_property_declaration (location_t location, tree decl, if (PROPERTY_NONATOMIC (x) != parsed_property_nonatomic) { warning_at (location, 0, - "'nonatomic' attribute of property %qD conflicts with previous declaration", decl); + "%<nonatomic%> attribute of property %qD conflicts with " + "previous declaration", decl); if (original_location != UNKNOWN_LOCATION) inform (original_location, "originally specified here"); @@ -1100,7 +1101,8 @@ objc_add_property_declaration (location_t location, tree decl, if (PROPERTY_GETTER_NAME (x) != parsed_property_getter_ident) { warning_at (location, 0, - "'getter' attribute of property %qD conflicts with previous declaration", decl); + "%<getter%> attribute of property %qD conflicts with " + "previous declaration", decl); if (original_location != UNKNOWN_LOCATION) inform (original_location, "originally specified here"); @@ -1113,7 +1115,8 @@ objc_add_property_declaration (location_t location, tree decl, if (PROPERTY_SETTER_NAME (x) != parsed_property_setter_ident) { warning_at (location, 0, - "'setter' attribute of property %qD conflicts with previous declaration", decl); + "%<setter%> attribute of property %qD conflicts with " + "previous declaration", decl); if (original_location != UNKNOWN_LOCATION) inform (original_location, "originally specified here"); @@ -1135,7 +1138,8 @@ objc_add_property_declaration (location_t location, tree decl, if (PROPERTY_READONLY (x) == 0 && property_readonly == 1) { warning_at (location, 0, - "'readonly' attribute of property %qD conflicts with previous declaration", decl); + "%<readonly%> attribute of property %qD conflicts with " + "previous declaration", decl); if (original_location != UNKNOWN_LOCATION) inform (original_location, "originally specified here"); @@ -7638,7 +7642,8 @@ objc_add_synthesize_declaration_for_property (location_t location, tree interfac { location_t original_location = DECL_SOURCE_LOCATION (ivar); - error_at (location, "'assign' property %qs is using bit-field instance variable %qs", + error_at (location, "%<assign%> property %qs is using bit-field " + "instance variable %qs", IDENTIFIER_POINTER (property_name), IDENTIFIER_POINTER (ivar_name)); @@ -7651,7 +7656,8 @@ objc_add_synthesize_declaration_for_property (location_t location, tree interfac { location_t original_location = DECL_SOURCE_LOCATION (ivar); - error_at (location, "'atomic' property %qs is using bit-field instance variable %qs", + error_at (location, "%<atomic%> property %qs is using bit-field " + "instance variable %qs", IDENTIFIER_POINTER (property_name), IDENTIFIER_POINTER (ivar_name)); diff --git a/gcc/omp-offload.c b/gcc/omp-offload.c index 7c65b2b..97ae47b 100644 --- a/gcc/omp-offload.c +++ b/gcc/omp-offload.c @@ -639,7 +639,7 @@ oacc_parse_default_dims (const char *dims) { malformed: error_at (UNKNOWN_LOCATION, - "%<-fopenacc-dim%> operand is malformed at '%s'", pos); + "%<-fopenacc-dim%> operand is malformed at %qs", pos); } } diff --git a/gcc/symtab.c b/gcc/symtab.c index c3c057d..d648d28 100644 --- a/gcc/symtab.c +++ b/gcc/symtab.c @@ -1002,7 +1002,7 @@ symtab_node::verify_base (void) != NULL) != dyn_cast <cgraph_node *> (this)->ifunc_resolver) { - error ("inconsistent `ifunc' attribute"); + error ("inconsistent %<ifunc%> attribute"); error_found = true; } } diff --git a/gcc/tlink.c b/gcc/tlink.c index b2fb026..16a7b15 100644 --- a/gcc/tlink.c +++ b/gcc/tlink.c @@ -490,7 +490,7 @@ recompile_files (void) if (!f->args) { - error ("repository file '%s' does not contain command-line " + error ("repository file %qs does not contain command-line " "arguments", f->key); return 0; } @@ -616,7 +616,7 @@ start_tweaking (symbol *sym) { if (sym && sym->tweaked) { - error ("'%s' was assigned to '%s', but was not defined " + error ("%qs was assigned to %qs, but was not defined " "during recompilation, or vice versa", sym->key, sym->file->key); return 0; diff --git a/gcc/tree-profile.c b/gcc/tree-profile.c index 1c3034a..9b6f351 100644 --- a/gcc/tree-profile.c +++ b/gcc/tree-profile.c @@ -632,7 +632,7 @@ parse_profile_filter (const char *regex, vec<regex_t> *v, regex_t r; if (regcomp (&r, p, REG_EXTENDED | REG_NOSUB) != 0) { - error ("invalid regular expression '%s' in %<%s%>", + error ("invalid regular expression %qs in %qs", p, flag_name); return; } |