summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormarxin <marxin@138bc75d-0d04-0410-961f-82ee72b054a4>2019-03-11 13:59:04 +0000
committermarxin <marxin@138bc75d-0d04-0410-961f-82ee72b054a4>2019-03-11 13:59:04 +0000
commitf2a60d44281aaddefc766b5650e443fb04aaebd0 (patch)
tree8fda972202e700a77c6634e36bb92060c51041a4
parent2f6d557ff82876432be76b1892c6c3783c0095f4 (diff)
Wrap apostrophes in gcc internal format with %'.
2019-03-11 Martin Liska <mliska@suse.cz> * check-internal-format-escaping.py: Uncomment apostrophes check. 2019-03-11 Martin Liska <mliska@suse.cz> * collect-utils.c (collect_wait): Wrap apostrophes in gcc internal format with %'. * collect2.c (main): Likewise. (scan_prog_file): Likewise. (scan_libraries): Likewise. * config/i386/i386.c (ix86_expand_call): Likewise. (ix86_handle_interrupt_attribute): Likewise. * config/nds32/nds32-intrinsic.c (nds32_expand_builtin_impl): Likewise. * config/nds32/nds32.c (nds32_insert_attributes): Likewise. * config/rl78/rl78.c (rl78_handle_saddr_attribute): Likewise. * lto-wrapper.c (find_crtoffloadtable): Likewise. * symtab.c (symtab_node::verify_base): Likewise. * tree-cfg.c (verify_gimple_label): Likewise. * tree.c (verify_type_variant): Likewise. 2019-03-11 Martin Liska <mliska@suse.cz> * c-opts.c (c_common_post_options): Wrap apostrophes in gcc internal format with %'. 2019-03-11 Martin Liska <mliska@suse.cz> * cvt.c (build_expr_type_conversion): Wrap apostrophes in gcc internal format with %'. * decl.c (check_no_redeclaration_friend_default_args): Likewise. (grokfndecl): Likewise. * name-lookup.c (do_pushtag): Likewise. * pt.c (unify_parameter_deduction_failure): Likewise. (unify_template_deduction_failure): Likewise. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@269587 138bc75d-0d04-0410-961f-82ee72b054a4
-rw-r--r--contrib/ChangeLog5
-rwxr-xr-xcontrib/check-internal-format-escaping.py4
-rw-r--r--gcc/ChangeLog17
-rw-r--r--gcc/c-family/ChangeLog5
-rw-r--r--gcc/c-family/c-opts.c2
-rw-r--r--gcc/collect-utils.c2
-rw-r--r--gcc/collect2.c6
-rw-r--r--gcc/config/i386/i386.c6
-rw-r--r--gcc/config/nds32/nds32-intrinsic.c8
-rw-r--r--gcc/config/nds32/nds32.c2
-rw-r--r--gcc/config/rl78/rl78.c2
-rw-r--r--gcc/cp/ChangeLog10
-rw-r--r--gcc/cp/cvt.c2
-rw-r--r--gcc/cp/decl.c4
-rw-r--r--gcc/cp/name-lookup.c2
-rw-r--r--gcc/cp/pt.c4
-rw-r--r--gcc/lto-wrapper.c2
-rw-r--r--gcc/symtab.c8
-rw-r--r--gcc/tree-cfg.c2
-rw-r--r--gcc/tree.c16
20 files changed, 73 insertions, 36 deletions
diff --git a/contrib/ChangeLog b/contrib/ChangeLog
index cd5a983ee7d4..74e9592f8c29 100644
--- a/contrib/ChangeLog
+++ b/contrib/ChangeLog
@@ -1,5 +1,10 @@
2019-03-11 Martin Liska <mliska@suse.cz>
+ * check-internal-format-escaping.py: Uncomment apostrophes
+ check.
+
+2019-03-11 Martin Liska <mliska@suse.cz>
+
* check-internal-format-escaping.py: New file.
2019-03-10 Tommy Nguyen <remyabel@gmail.com>
diff --git a/contrib/check-internal-format-escaping.py b/contrib/check-internal-format-escaping.py
index 5513b762271f..5da56b59dd6b 100755
--- a/contrib/check-internal-format-escaping.py
+++ b/contrib/check-internal-format-escaping.py
@@ -56,8 +56,8 @@ 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):
-# print('%s: %s' % (origin, text))
+ if re.search("[a-zA-Z]'[a-zA-Z]", p):
+ print('%s: %s' % (origin, text))
j += 1
origin = None
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index dd070969d644..61e23a645b16 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,5 +1,22 @@
2019-03-11 Martin Liska <mliska@suse.cz>
+ * collect-utils.c (collect_wait): Wrap apostrophes
+ in gcc internal format with %'.
+ * collect2.c (main): Likewise.
+ (scan_prog_file): Likewise.
+ (scan_libraries): Likewise.
+ * config/i386/i386.c (ix86_expand_call): Likewise.
+ (ix86_handle_interrupt_attribute): Likewise.
+ * config/nds32/nds32-intrinsic.c (nds32_expand_builtin_impl): Likewise.
+ * config/nds32/nds32.c (nds32_insert_attributes): Likewise.
+ * config/rl78/rl78.c (rl78_handle_saddr_attribute): Likewise.
+ * lto-wrapper.c (find_crtoffloadtable): Likewise.
+ * symtab.c (symtab_node::verify_base): Likewise.
+ * tree-cfg.c (verify_gimple_label): Likewise.
+ * tree.c (verify_type_variant): Likewise.
+
+2019-03-11 Martin Liska <mliska@suse.cz>
+
* builtins.c (expand_builtin_thread_pointer): Wrap an option name
in a string format message and fix GNU coding style.
(expand_builtin_set_thread_pointer): Likewise.
diff --git a/gcc/c-family/ChangeLog b/gcc/c-family/ChangeLog
index e529538d8ff7..885e3265d5b7 100644
--- a/gcc/c-family/ChangeLog
+++ b/gcc/c-family/ChangeLog
@@ -1,5 +1,10 @@
2019-03-11 Martin Liska <mliska@suse.cz>
+ * c-opts.c (c_common_post_options): Wrap apostrophes
+ in gcc internal format with %'.
+
+2019-03-11 Martin Liska <mliska@suse.cz>
+
* c-attribs.c (handle_nocf_check_attribute): Wrap an option name
in a string format message and fix GNU coding style.
* c-common.c (vector_types_convertible_p): Likewise.
diff --git a/gcc/c-family/c-opts.c b/gcc/c-family/c-opts.c
index 3233fdb9775c..daa02a5e72d1 100644
--- a/gcc/c-family/c-opts.c
+++ b/gcc/c-family/c-opts.c
@@ -945,7 +945,7 @@ c_common_post_options (const char **pfilename)
if (flag_abi_version == latest_abi_version)
{
auto_diagnostic_group d;
- if (warning (OPT_Wabi, "%<-Wabi%> won't warn about anything"))
+ if (warning (OPT_Wabi, "%<-Wabi%> won%'t warn about anything"))
{
inform (input_location, "%<-Wabi%> warns about differences "
"from the most up-to-date ABI, which is also used "
diff --git a/gcc/collect-utils.c b/gcc/collect-utils.c
index fba3f7496ef3..1e034433b802 100644
--- a/gcc/collect-utils.c
+++ b/gcc/collect-utils.c
@@ -65,7 +65,7 @@ collect_wait (const char *prog, struct pex_obj *pex)
int status;
if (!pex_get_status (pex, 1, &status))
- fatal_error (input_location, "can't get program status: %m");
+ fatal_error (input_location, "can%'t get program status: %m");
pex_free (pex);
if (response_file && !save_temps)
diff --git a/gcc/collect2.c b/gcc/collect2.c
index da956bfd9849..9d7de940ec17 100644
--- a/gcc/collect2.c
+++ b/gcc/collect2.c
@@ -1396,7 +1396,7 @@ main (int argc, char **argv)
stream = fopen (list_filename, "r");
if (stream == NULL)
- fatal_error (input_location, "can't open %s: %m",
+ fatal_error (input_location, "can%'t open %s: %m",
list_filename);
while (fgets (buf, sizeof buf, stream) != NULL)
@@ -2470,7 +2470,7 @@ scan_prog_file (const char *prog_name, scanpass which_pass,
inf = pex_read_output (pex, 0);
if (inf == NULL)
- fatal_error (input_location, "can't open nm output: %m");
+ fatal_error (input_location, "can%'t open nm output: %m");
if (debug)
fprintf (stderr, "\nnm output with constructors/destructors.\n");
@@ -2639,7 +2639,7 @@ scan_libraries (const char *prog_name)
inf = pex_read_output (pex, 0);
if (inf == NULL)
- fatal_error (input_location, "can't open ldd output: %m");
+ fatal_error (input_location, "can%'t open ldd output: %m");
if (debug)
notice ("\nldd output with constructors/destructors.\n");
diff --git a/gcc/config/i386/i386.c b/gcc/config/i386/i386.c
index a4a7fbcfbe02..896c6f33d40f 100644
--- a/gcc/config/i386/i386.c
+++ b/gcc/config/i386/i386.c
@@ -28399,7 +28399,7 @@ ix86_expand_call (rtx retval, rtx fnaddr, rtx callarg1,
if (fndecl
&& (lookup_attribute ("interrupt",
TYPE_ATTRIBUTES (TREE_TYPE (fndecl)))))
- error ("interrupt service routine can't be called directly");
+ error ("interrupt service routine can%'t be called directly");
}
else
fndecl = NULL_TREE;
@@ -38375,7 +38375,7 @@ rdseed_step:
mode0 = insn_data[icode].operand[0].mode;
if (!insn_data[icode].operand[0].predicate (op0, mode0))
{
- error ("the xabort's argument must be an 8-bit immediate");
+ error ("xabort argument must be an 8-bit immediate");
return const0_rtx;
}
emit_insn (gen_xabort (op0));
@@ -41440,7 +41440,7 @@ ix86_handle_interrupt_attribute (tree *node, tree, tree, int, bool *)
error ("interrupt service routine can only have a pointer argument "
"and an optional integer argument");
if (! VOID_TYPE_P (return_type))
- error ("interrupt service routine can't have non-void return value");
+ error ("interrupt service routine can%'t have non-void return value");
return NULL_TREE;
}
diff --git a/gcc/config/nds32/nds32-intrinsic.c b/gcc/config/nds32/nds32-intrinsic.c
index 04aa29095d7f..c78dc935bf3e 100644
--- a/gcc/config/nds32/nds32-intrinsic.c
+++ b/gcc/config/nds32/nds32-intrinsic.c
@@ -1000,7 +1000,7 @@ nds32_expand_builtin_impl (tree exp,
if (!NDS32_EXT_DSP_P ()
&& fcode > NDS32_BUILTIN_DSP_BEGIN
&& fcode < NDS32_BUILTIN_DSP_END)
- error ("don't support DSP extension instructions");
+ error ("don%'t support DSP extension instructions");
switch (fcode)
{
@@ -1059,7 +1059,7 @@ nds32_expand_builtin_impl (tree exp,
case NDS32_BUILTIN_CLO:
if (!TARGET_EXT_PERF)
{
- error ("don't support performance extension instructions");
+ error ("don%'t support performance extension instructions");
return NULL_RTX;
}
break;
@@ -1071,7 +1071,7 @@ nds32_expand_builtin_impl (tree exp,
case NDS32_BUILTIN_BSP:
if (!TARGET_EXT_PERF2)
{
- error ("don't support performance extension "
+ error ("don%'t support performance extension "
"version 2 instructions");
return NULL_RTX;
}
@@ -1083,7 +1083,7 @@ nds32_expand_builtin_impl (tree exp,
case NDS32_BUILTIN_FLMISM:
if (!TARGET_EXT_STRING)
{
- error ("don't support string extension instructions");
+ error ("don%'t support string extension instructions");
return NULL_RTX;
}
break;
diff --git a/gcc/config/nds32/nds32.c b/gcc/config/nds32/nds32.c
index 8bee154a429f..f2723ea4cdcd 100644
--- a/gcc/config/nds32/nds32.c
+++ b/gcc/config/nds32/nds32.c
@@ -3944,7 +3944,7 @@ nds32_insert_attributes (tree decl, tree *attributes)
new_attrs = tree_cons (get_identifier ("noclone"), NULL, new_attrs);
if (!TREE_PUBLIC (decl))
- error("indirect_call attribute can't apply for static function");
+ error ("indirect_call attribute can%'t apply for static function");
*attributes = new_attrs;
}
diff --git a/gcc/config/rl78/rl78.c b/gcc/config/rl78/rl78.c
index c127c5065701..d2caa118281c 100644
--- a/gcc/config/rl78/rl78.c
+++ b/gcc/config/rl78/rl78.c
@@ -864,7 +864,7 @@ rl78_handle_saddr_attribute (tree * node,
if (TREE_CODE (* node) == FUNCTION_DECL)
{
- warning (OPT_Wattributes, "%qE attribute doesn't apply to functions",
+ warning (OPT_Wattributes, "%qE attribute doesn%'t apply to functions",
name);
* no_add_attrs = true;
}
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog
index fd983475384c..8cad038fd1c9 100644
--- a/gcc/cp/ChangeLog
+++ b/gcc/cp/ChangeLog
@@ -1,5 +1,15 @@
2019-03-11 Martin Liska <mliska@suse.cz>
+ * cvt.c (build_expr_type_conversion): Wrap apostrophes
+ in gcc internal format with %'.
+ * decl.c (check_no_redeclaration_friend_default_args): Likewise.
+ (grokfndecl): Likewise.
+ * name-lookup.c (do_pushtag): Likewise.
+ * pt.c (unify_parameter_deduction_failure): Likewise.
+ (unify_template_deduction_failure): Likewise.
+
+2019-03-11 Martin Liska <mliska@suse.cz>
+
* call.c (convert_arg_to_ellipsis): Wrap an option name
in a string format message and fix GNU coding style.
(build_over_call): Likewise.
diff --git a/gcc/cp/cvt.c b/gcc/cp/cvt.c
index c10db92bd6f3..3b8656c2a6b4 100644
--- a/gcc/cp/cvt.c
+++ b/gcc/cp/cvt.c
@@ -1822,7 +1822,7 @@ build_expr_type_conversion (int desires, tree expr, bool complain)
if (TREE_CODE (cand) == TEMPLATE_DECL)
{
if (complain)
- error ("default type conversion can't deduce template"
+ error ("default type conversion can%'t deduce template"
" argument for %qD", cand);
return error_mark_node;
}
diff --git a/gcc/cp/decl.c b/gcc/cp/decl.c
index 89edfe8ed01c..c8435e29491e 100644
--- a/gcc/cp/decl.c
+++ b/gcc/cp/decl.c
@@ -1305,7 +1305,7 @@ check_no_redeclaration_friend_default_args (tree olddecl, tree newdecl,
auto_diagnostic_group d;
if (permerror (DECL_SOURCE_LOCATION (newdecl),
"friend declaration of %q#D specifies default "
- "arguments and isn't the only declaration", newdecl))
+ "arguments and isn%'t the only declaration", newdecl))
inform (DECL_SOURCE_LOCATION (olddecl),
"previous declaration of %q#D", olddecl);
return;
@@ -8913,7 +8913,7 @@ grokfndecl (tree ctype,
{
permerror (DECL_SOURCE_LOCATION (decl),
"friend declaration of %qD specifies default "
- "arguments and isn't a definition", decl);
+ "arguments and isn%'t a definition", decl);
break;
}
}
diff --git a/gcc/cp/name-lookup.c b/gcc/cp/name-lookup.c
index 2ba888fd1c2e..4ca976c812d8 100644
--- a/gcc/cp/name-lookup.c
+++ b/gcc/cp/name-lookup.c
@@ -6897,7 +6897,7 @@ do_pushtag (tree name, tree type, tag_scope scope)
&& !CLASSTYPE_TEMPLATE_INFO (type))
{
error ("declaration of %<std::initializer_list%> does not match "
- "%<#include <initializer_list>%>, isn't a template");
+ "%<#include <initializer_list>%>, isn%'t a template");
return error_mark_node;
}
}
diff --git a/gcc/cp/pt.c b/gcc/cp/pt.c
index f48f4605b0fe..2ab6e273c3ad 100644
--- a/gcc/cp/pt.c
+++ b/gcc/cp/pt.c
@@ -6364,7 +6364,7 @@ unify_parameter_deduction_failure (bool explain_p, tree parm)
{
if (explain_p)
inform (input_location,
- " couldn't deduce template parameter %qD", parm);
+ " couldn%'t deduce template parameter %qD", parm);
return unify_invalid (explain_p);
}
@@ -6540,7 +6540,7 @@ unify_template_deduction_failure (bool explain_p, tree parm, tree arg)
{
if (explain_p)
inform (input_location,
- " can't deduce a template for %qT from non-template type %qT",
+ " can%'t deduce a template for %qT from non-template type %qT",
parm, arg);
return unify_invalid (explain_p);
}
diff --git a/gcc/lto-wrapper.c b/gcc/lto-wrapper.c
index c079c7b71615..2cd69f240489 100644
--- a/gcc/lto-wrapper.c
+++ b/gcc/lto-wrapper.c
@@ -960,7 +960,7 @@ find_crtoffloadtable (void)
}
if (i == n_paths)
fatal_error (input_location,
- "installation error, can't find crtoffloadtable.o");
+ "installation error, can%'t find crtoffloadtable.o");
free_array_of_ptrs ((void **) paths, n_paths);
}
diff --git a/gcc/symtab.c b/gcc/symtab.c
index 16a21359f8dd..c3c057d32831 100644
--- a/gcc/symtab.c
+++ b/gcc/symtab.c
@@ -1155,7 +1155,7 @@ symtab_node::verify_base (void)
}
if (implicit_section && !get_section ())
{
- error ("implicit_section flag is set but section isn't");
+ error ("implicit_section flag is set but section isn%'t");
error_found = true;
}
if (get_section () && get_comdat_group ()
@@ -1174,14 +1174,14 @@ symtab_node::verify_base (void)
|| strcmp (get_section(),
get_alias_target ()->get_section ())))
{
- error ("Alias and target's section differs");
+ error ("Alias and target%'s section differs");
get_alias_target ()->dump (stderr);
error_found = true;
}
if (alias && definition
&& get_comdat_group () != get_alias_target ()->get_comdat_group ())
{
- error ("Alias and target's comdat groups differs");
+ error ("Alias and target%'s comdat groups differs");
get_alias_target ()->dump (stderr);
error_found = true;
}
@@ -1196,7 +1196,7 @@ symtab_node::verify_base (void)
ultimate_transparent_alias_target (DECL_ASSEMBLER_NAME (to->decl)));
if (!symbol_table::assembler_names_equal_p (name1, name2))
{
- error ("Transparent alias and target's assembler names differs");
+ error ("Transparent alias and target%'s assembler names differs");
get_alias_target ()->dump (stderr);
error_found = true;
}
diff --git a/gcc/tree-cfg.c b/gcc/tree-cfg.c
index c8d6d1b12a95..805e8727ce0d 100644
--- a/gcc/tree-cfg.c
+++ b/gcc/tree-cfg.c
@@ -4827,7 +4827,7 @@ verify_gimple_label (glabel *stmt)
if (!DECL_NONLOCAL (decl) && !FORCED_LABEL (decl)
&& DECL_CONTEXT (decl) != current_function_decl)
{
- error ("label's context is not the current function decl");
+ error ("label%'s context is not the current function decl");
err |= true;
}
diff --git a/gcc/tree.c b/gcc/tree.c
index 6528057524c7..02721cfc8a04 100644
--- a/gcc/tree.c
+++ b/gcc/tree.c
@@ -13815,9 +13815,9 @@ verify_type_variant (const_tree t, tree tv)
TYPE_SIZE_UNIT (tv), 0));
error ("type variant has different TYPE_SIZE_UNIT");
debug_tree (tv);
- error ("type variant's TYPE_SIZE_UNIT");
+ error ("type variant%'s TYPE_SIZE_UNIT");
debug_tree (TYPE_SIZE_UNIT (tv));
- error ("type's TYPE_SIZE_UNIT");
+ error ("type%'s TYPE_SIZE_UNIT");
debug_tree (TYPE_SIZE_UNIT (t));
return false;
}
@@ -13888,9 +13888,9 @@ verify_type_variant (const_tree t, tree tv)
{
error ("type variant has different TYPE_BINFO");
debug_tree (tv);
- error ("type variant's TYPE_BINFO");
+ error ("type variant%'s TYPE_BINFO");
debug_tree (TYPE_BINFO (tv));
- error ("type's TYPE_BINFO");
+ error ("type%'s TYPE_BINFO");
debug_tree (TYPE_BINFO (t));
return false;
}
@@ -13952,9 +13952,9 @@ verify_type_variant (const_tree t, tree tv)
{
error ("type variant has different TREE_TYPE");
debug_tree (tv);
- error ("type variant's TREE_TYPE");
+ error ("type variant%'s TREE_TYPE");
debug_tree (TREE_TYPE (tv));
- error ("type's TREE_TYPE");
+ error ("type%'s TREE_TYPE");
debug_tree (TREE_TYPE (t));
return false;
}
@@ -13963,9 +13963,9 @@ verify_type_variant (const_tree t, tree tv)
{
error ("type is not compatible with its variant");
debug_tree (tv);
- error ("type variant's TREE_TYPE");
+ error ("type variant%'s TREE_TYPE");
debug_tree (TREE_TYPE (tv));
- error ("type's TREE_TYPE");
+ error ("type%'s TREE_TYPE");
debug_tree (TREE_TYPE (t));
return false;
}