diff options
author | Marek Polacek <polacek@redhat.com> | 2016-06-06 21:15:07 +0000 |
---|---|---|
committer | Marek Polacek <mpolacek@gcc.gnu.org> | 2016-06-06 21:15:07 +0000 |
commit | 1f40cff37998535a8f6f3eb6989327d8be3c8efb (patch) | |
tree | 5e94980823d22597d1674945fb32b9b600964729 /gcc/c/c-parser.c | |
parent | 6f5bcd24004651c3b92af349fcfa56d7328c8ee4 (diff) | |
download | gcc-1f40cff37998535a8f6f3eb6989327d8be3c8efb.zip gcc-1f40cff37998535a8f6f3eb6989327d8be3c8efb.tar.gz gcc-1f40cff37998535a8f6f3eb6989327d8be3c8efb.tar.bz2 |
re PR c/71362 (Wrong position for "error: size of unnamed array is negative")
PR c/71362
* c-parser.c (c_parser_direct_declarator): Set location.
* gcc.dg/pr71362.c: New test.
From-SVN: r237155
Diffstat (limited to 'gcc/c/c-parser.c')
-rw-r--r-- | gcc/c/c-parser.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/gcc/c/c-parser.c b/gcc/c/c-parser.c index bca8653..799a473 100644 --- a/gcc/c/c-parser.c +++ b/gcc/c/c-parser.c @@ -3430,6 +3430,7 @@ c_parser_direct_declarator (c_parser *parser, bool type_seen_p, c_dtr_syn kind, && c_parser_next_token_is (parser, CPP_OPEN_SQUARE)) { struct c_declarator *inner = build_id_declarator (NULL_TREE); + inner->id_loc = c_parser_peek_token (parser)->location; return c_parser_direct_declarator_inner (parser, *seen_id, inner); } |