aboutsummaryrefslogtreecommitdiff
path: root/gcc/c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/c')
-rw-r--r--gcc/c/ChangeLog16
-rw-r--r--gcc/c/c-decl.c34
-rw-r--r--gcc/c/c-parser.c41
-rw-r--r--gcc/c/c-typeck.c29
4 files changed, 65 insertions, 55 deletions
diff --git a/gcc/c/ChangeLog b/gcc/c/ChangeLog
index 8bb9d37..60feeea 100644
--- a/gcc/c/ChangeLog
+++ b/gcc/c/ChangeLog
@@ -1,3 +1,19 @@
+2017-10-31 David Malcolm <dmalcolm@redhat.com>
+
+ * c-decl.c (implicit_decl_warning): Update for renaming of
+ pedwarn_at_rich_loc and warning_at_rich_loc.
+ (implicitly_declare): Likewise for renaming of inform_at_rich_loc.
+ (undeclared_variable): Likewise for renaming of error_at_rich_loc.
+ * c-parser.c (c_parser_declaration_or_fndef): Likewise.
+ (c_parser_struct_or_union_specifier): Likewise for renaming of
+ pedwarn_at_rich_loc.
+ (c_parser_parameter_declaration): Likewise for renaming of
+ error_at_rich_loc.
+ * c-typeck.c (build_component_ref): Likewise.
+ (build_unary_op): Likewise for renaming of inform_at_rich_loc.
+ (pop_init_level): Likewise for renaming of warning_at_rich_loc.
+ (set_init_label): Likewise for renaming of error_at_rich_loc.
+
2017-10-30 Richard Biener <rguenther@suse.de>
* gimple-parser.c (c_parser_gimple_statement): Parse conditional
diff --git a/gcc/c/c-decl.c b/gcc/c/c-decl.c
index 78405c8..d95a2b6 100644
--- a/gcc/c/c-decl.c
+++ b/gcc/c/c-decl.c
@@ -3119,10 +3119,10 @@ implicit_decl_warning (location_t loc, tree id, tree olddecl)
{
gcc_rich_location richloc (loc);
richloc.add_fixit_replace (hint);
- warned = pedwarn_at_rich_loc
- (&richloc, OPT_Wimplicit_function_declaration,
- "implicit declaration of function %qE; did you mean %qs?",
- id, hint);
+ warned = pedwarn (&richloc, OPT_Wimplicit_function_declaration,
+ "implicit declaration of function %qE;"
+ " did you mean %qs?",
+ id, hint);
}
else
warned = pedwarn (loc, OPT_Wimplicit_function_declaration,
@@ -3132,7 +3132,7 @@ implicit_decl_warning (location_t loc, tree id, tree olddecl)
{
gcc_rich_location richloc (loc);
richloc.add_fixit_replace (hint);
- warned = warning_at_rich_loc
+ warned = warning_at
(&richloc, OPT_Wimplicit_function_declaration,
G_("implicit declaration of function %qE; did you mean %qs?"),
id, hint);
@@ -3401,10 +3401,9 @@ implicitly_declare (location_t loc, tree functionid)
{
rich_location richloc (line_table, loc);
maybe_add_include_fixit (&richloc, header);
- inform_at_rich_loc
- (&richloc,
- "include %qs or provide a declaration of %qD",
- header, decl);
+ inform (&richloc,
+ "include %qs or provide a declaration of %qD",
+ header, decl);
}
newtype = TREE_TYPE (decl);
}
@@ -3472,10 +3471,10 @@ undeclared_variable (location_t loc, tree id)
{
gcc_rich_location richloc (loc);
richloc.add_fixit_replace (guessed_id);
- error_at_rich_loc (&richloc,
- "%qE undeclared here (not in a function);"
- " did you mean %qs?",
- id, guessed_id);
+ error_at (&richloc,
+ "%qE undeclared here (not in a function);"
+ " did you mean %qs?",
+ id, guessed_id);
}
else
error_at (loc, "%qE undeclared here (not in a function)", id);
@@ -3490,11 +3489,10 @@ undeclared_variable (location_t loc, tree id)
{
gcc_rich_location richloc (loc);
richloc.add_fixit_replace (guessed_id);
- error_at_rich_loc
- (&richloc,
- "%qE undeclared (first use in this function);"
- " did you mean %qs?",
- id, guessed_id);
+ error_at (&richloc,
+ "%qE undeclared (first use in this function);"
+ " did you mean %qs?",
+ id, guessed_id);
}
else
error_at (loc, "%qE undeclared (first use in this function)", id);
diff --git a/gcc/c/c-parser.c b/gcc/c/c-parser.c
index 68c45fd..7bca5f1 100644
--- a/gcc/c/c-parser.c
+++ b/gcc/c/c-parser.c
@@ -1785,26 +1785,26 @@ c_parser_declaration_or_fndef (c_parser *parser, bool fndef_ok,
{
/* This is not C++ with its implicit typedef. */
richloc.add_fixit_insert_before ("struct ");
- error_at_rich_loc (&richloc,
- "unknown type name %qE;"
- " use %<struct%> keyword to refer to the type",
- name);
+ error_at (&richloc,
+ "unknown type name %qE;"
+ " use %<struct%> keyword to refer to the type",
+ name);
}
else if (tag_exists_p (UNION_TYPE, name))
{
richloc.add_fixit_insert_before ("union ");
- error_at_rich_loc (&richloc,
- "unknown type name %qE;"
- " use %<union%> keyword to refer to the type",
- name);
+ error_at (&richloc,
+ "unknown type name %qE;"
+ " use %<union%> keyword to refer to the type",
+ name);
}
else if (tag_exists_p (ENUMERAL_TYPE, name))
{
richloc.add_fixit_insert_before ("enum ");
- error_at_rich_loc (&richloc,
- "unknown type name %qE;"
- " use %<enum%> keyword to refer to the type",
- name);
+ error_at (&richloc,
+ "unknown type name %qE;"
+ " use %<enum%> keyword to refer to the type",
+ name);
}
else
{
@@ -1812,9 +1812,9 @@ c_parser_declaration_or_fndef (c_parser *parser, bool fndef_ok,
if (hint)
{
richloc.add_fixit_replace (hint);
- error_at_rich_loc (&richloc,
- "unknown type name %qE; did you mean %qs?",
- name, hint);
+ error_at (&richloc,
+ "unknown type name %qE; did you mean %qs?",
+ name, hint);
}
else
error_at (here, "unknown type name %qE", name);
@@ -3168,9 +3168,8 @@ c_parser_struct_or_union_specifier (c_parser *parser)
= c_parser_peek_token (parser)->location;
gcc_rich_location richloc (semicolon_loc);
richloc.add_fixit_remove ();
- pedwarn_at_rich_loc
- (&richloc, OPT_Wpedantic,
- "extra semicolon in struct or union specified");
+ pedwarn (&richloc, OPT_Wpedantic,
+ "extra semicolon in struct or union specified");
c_parser_consume_token (parser);
continue;
}
@@ -4073,9 +4072,9 @@ c_parser_parameter_declaration (c_parser *parser, tree attrs)
{
gcc_rich_location richloc (token->location);
richloc.add_fixit_replace (hint);
- error_at_rich_loc (&richloc,
- "unknown type name %qE; did you mean %qs?",
- token->value, hint);
+ error_at (&richloc,
+ "unknown type name %qE; did you mean %qs?",
+ token->value, hint);
}
else
error_at (token->location, "unknown type name %qE", token->value);
diff --git a/gcc/c/c-typeck.c b/gcc/c/c-typeck.c
index cb9c589..4bdc48a 100644
--- a/gcc/c/c-typeck.c
+++ b/gcc/c/c-typeck.c
@@ -2406,10 +2406,9 @@ build_component_ref (location_t loc, tree datum, tree component,
gcc_rich_location rich_loc (reported_loc);
if (component_loc != UNKNOWN_LOCATION)
rich_loc.add_fixit_misspelled_id (component_loc, guessed_id);
- error_at_rich_loc
- (&rich_loc,
- "%qT has no member named %qE; did you mean %qE?",
- type, component, guessed_id);
+ error_at (&rich_loc,
+ "%qT has no member named %qE; did you mean %qE?",
+ type, component, guessed_id);
}
else
error_at (loc, "%qT has no member named %qE", type, component);
@@ -2483,9 +2482,9 @@ build_component_ref (location_t loc, tree datum, tree component,
rich_location richloc (line_table, loc);
/* "loc" should be the "." token. */
richloc.add_fixit_replace ("->");
- error_at_rich_loc (&richloc,
- "%qE is a pointer; did you mean to use %<->%>?",
- datum);
+ error_at (&richloc,
+ "%qE is a pointer; did you mean to use %<->%>?",
+ datum);
return error_mark_node;
}
else if (code != ERROR_MARK)
@@ -4276,8 +4275,7 @@ build_unary_op (location_t location, enum tree_code code, tree xarg,
{
gcc_rich_location richloc (location);
richloc.add_fixit_insert_before (location, "!");
- inform_at_rich_loc (&richloc, "did you mean to use logical "
- "not?");
+ inform (&richloc, "did you mean to use logical not?");
}
if (!noconvert)
arg = default_conversion (arg);
@@ -8256,9 +8254,9 @@ pop_init_level (location_t loc, int implicit,
&& !constructor_zeroinit)
{
gcc_assert (initializer_stack->missing_brace_richloc);
- warning_at_rich_loc (initializer_stack->missing_brace_richloc,
- OPT_Wmissing_braces,
- "missing braces around initializer");
+ warning_at (initializer_stack->missing_brace_richloc,
+ OPT_Wmissing_braces,
+ "missing braces around initializer");
}
/* Warn when some struct elements are implicitly initialized to zero. */
@@ -8580,10 +8578,9 @@ set_init_label (location_t loc, tree fieldname, location_t fieldname_loc,
{
gcc_rich_location rich_loc (fieldname_loc);
rich_loc.add_fixit_misspelled_id (fieldname_loc, guessed_id);
- error_at_rich_loc
- (&rich_loc,
- "%qT has no member named %qE; did you mean %qE?",
- constructor_type, fieldname, guessed_id);
+ error_at (&rich_loc,
+ "%qT has no member named %qE; did you mean %qE?",
+ constructor_type, fieldname, guessed_id);
}
else
error_at (fieldname_loc, "%qT has no member named %qE",