diff mbox

[11/22] Objective C: c/c-parser.c: use token ranges in two places

Message ID 1441916913-11547-12-git-send-email-dmalcolm@redhat.com
State New
Headers show

Commit Message

David Malcolm Sept. 10, 2015, 8:28 p.m. UTC
I don't yet have an explicit test case for these.

gcc/c/ChangeLog:
	* c-parser.c (c_parser_declaration_or_fndef): Use token range
	rather than location for a couple of warnings.
---
 gcc/c/c-parser.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
diff mbox

Patch

diff --git a/gcc/c/c-parser.c b/gcc/c/c-parser.c
index 6e6464b..9bb5200 100644
--- a/gcc/c/c-parser.c
+++ b/gcc/c/c-parser.c
@@ -1608,7 +1608,7 @@  c_parser_declaration_or_fndef (c_parser *parser, bool fndef_ok,
 	      return;
 	    if (specs->attrs)
 	      {
-		warning_at (c_parser_peek_token (parser)->location, 
+		warning_at (c_parser_peek_token (parser)->range,
 			    OPT_Wattributes,
 	       		    "prefix attributes are ignored for methods");
 		specs->attrs = NULL_TREE;
@@ -1643,7 +1643,7 @@  c_parser_declaration_or_fndef (c_parser *parser, bool fndef_ok,
 	      return;
 	    if (specs->attrs)
 	      {
-		warning_at (c_parser_peek_token (parser)->location, 
+		warning_at (c_parser_peek_token (parser)->range,
 			OPT_Wattributes,
 			"prefix attributes are ignored for implementations");
 		specs->attrs = NULL_TREE;