diff options
author | jsm28 <jsm28@138bc75d-0d04-0410-961f-82ee72b054a4> | 2005-03-02 02:50:25 +0000 |
---|---|---|
committer | jsm28 <jsm28@138bc75d-0d04-0410-961f-82ee72b054a4> | 2005-03-02 02:50:25 +0000 |
commit | 8dc938b96836b81a9641e3d0815aa1338a99b17c (patch) | |
tree | 87b2d47fdc5b99120fde55ab67dd2c05f1a341b4 /gcc/c-parser.c | |
parent | 35d8b8ba32a7d9dc2d24ca3edf1aaccf2c467c52 (diff) | |
download | gcc-8dc938b96836b81a9641e3d0815aa1338a99b17c.tar.gz |
PR c/8927
* c-tree.h (undeclared_variable, build_external_ref): Add extra
argument.
* c-decl.c (undeclared_variable): Take location as argument.
* c-typeck.c (build_external_ref): Likewise.
* c-parser.c (c_parser_postfix_expression): Pass location of
identifier to build_external_ref.
testsuite:
* gcc.dg/pr8927-1.c: New test.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@95773 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/c-parser.c')
-rw-r--r-- | gcc/c-parser.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/gcc/c-parser.c b/gcc/c-parser.c index de6999a0add..e08f436b46e 100644 --- a/gcc/c-parser.c +++ b/gcc/c-parser.c @@ -4803,10 +4803,11 @@ c_parser_postfix_expression (c_parser *parser) } { tree id = c_parser_peek_token (parser)->value; + location_t loc = c_parser_peek_token (parser)->location; c_parser_consume_token (parser); expr.value = build_external_ref (id, (c_parser_peek_token (parser)->type - == CPP_OPEN_PAREN)); + == CPP_OPEN_PAREN), loc); expr.original_code = ERROR_MARK; } break; |