This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
c-parser.c replace error() by error_at()
- From: Prathamesh Kulkarni <bilbotheelffriend at gmail dot com>
- To: gcc-patches at gcc dot gnu dot org, "Joseph S. Myers" <joseph at codesourcery dot com>
- Date: Wed, 19 Feb 2014 18:05:12 +0530
- Subject: c-parser.c replace error() by error_at()
- Authentication-results: sourceware.org; auth=none
Replace calls to error() by error_at().
* c-parser.c (c_parser_declspecs): replace call to error () by error_at ()
* c-parser.c (c_parser_parameter_declaration): Likewise
Bootstrapped on x86_64-unknown-linux-gnu
Ok for trunk ?
Thanks and Regards,
Prathamesh
Index: gcc/c/c-parser.c
===================================================================
--- gcc/c/c-parser.c (revision 207700)
+++ gcc/c/c-parser.c (working copy)
@@ -2223,7 +2223,7 @@ c_parser_declspecs (c_parser *parser, st
attrs_ok = true;
if (kind == C_ID_ID)
{
- error ("unknown type name %qE", value);
+ error_at (loc, "unknown type name %qE", value);
t.kind = ctsk_typedef;
t.spec = error_mark_node;
}
@@ -3608,7 +3608,7 @@ c_parser_parameter_declaration (c_parser
c_parser_set_source_position_from_token (token);
if (c_parser_next_tokens_start_typename (parser, cla_prefer_type))
{
- error ("unknown type name %qE", token->value);
+ error_at (token->location, "unknown type name %qE", token->value);
parser->error = true;
}
/* ??? In some Objective-C cases '...' isn't applicable so there