+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
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
+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
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)
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;
}
/* 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')
/* If we do not have an `ldd', complain. */
if (ldd_file_name == 0)
{
- error ("cannot find 'ldd'");
+ error ("cannot find %<ldd%>");
return;
}
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);
}
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;
}
}
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;
}
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;
}
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
|| 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;
}
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;
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"))
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}*]) */
int tok;
if (pragma_lex (&x) != CPP_OPEN_PAREN)
- BAD ("missing '(' after '#pragma unused', ignoring");
+ BAD ("missing %<(%> after %<#pragma unused%>, ignoring");
while (1)
{
}
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. */
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"))
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 {
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;
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;
}
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':
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)
break;
default:
- error ("PRINT_OPERAND: Unknown punctuation '%c'", letter);
+ error ("PRINT_OPERAND: Unknown punctuation %<%c%>", letter);
break;
}
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;
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"
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));
}
{
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);
{
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);
msp430x = false;
}
else if (msp430_warn_mcu)
- warning (0, "Unrecognized MCU name '%s'.", target_mcu);
+ warning (0, "Unrecognized MCU name %qs.", target_mcu);
}
}
{
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 ();
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
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;
}
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;
}
if (tok != CPP_NAME)
{
- warning (OPT_Wpragmas, "malformed '#pragma member_alignment', ignoring");
+ warning (OPT_Wpragmas,
+ "malformed %<#pragma member_alignment%>, ignoring");
return;
}
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;
}
}
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);
if (tok != CPP_EOF)
{
- error ("garbage at end of '#pragma nomember_alignment'");
+ error ("garbage at end of %<#pragma nomember_alignment%>");
return;
}
}
if (tok != CPP_NAME)
{
- warning (OPT_Wpragmas, "malformed '#pragma extern_model', ignoring");
+ warning (OPT_Wpragmas, "malformed %<#pragma extern_model%>, ignoring");
return;
}
}
else
{
- error ("unknown '#pragma extern_model' model '%s'", arg);
+ error ("unknown %<#pragma extern_model%> model %qs", arg);
return;
}
#if 0
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");
+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
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");
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");
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");
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");
{
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));
{
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));
{
malformed:
error_at (UNKNOWN_LOCATION,
- "%<-fopenacc-dim%> operand is malformed at '%s'", pos);
+ "%<-fopenacc-dim%> operand is malformed at %qs", pos);
}
}
!= NULL)
!= dyn_cast <cgraph_node *> (this)->ifunc_resolver)
{
- error ("inconsistent `ifunc' attribute");
+ error ("inconsistent %<ifunc%> attribute");
error_found = true;
}
}
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;
}
{
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;
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;
}