C FE: fix range of primary-expression in c_parser_postfix_expression
commite2093e02334ad1e2f2bbbfc30ae4584338eb6812
authordmalcolm <dmalcolm@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 16 Dec 2015 17:34:27 +0000 (16 17:34 +0000)
committerdmalcolm <dmalcolm@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 16 Dec 2015 17:34:27 +0000 (16 17:34 +0000)
tree06e42b3a3c984a789fc1e46e75bbbbae500d417c
parent18d73d6f3868fe4dad7b5168fe8522eb97d11fdb
C FE: fix range of primary-expression in c_parser_postfix_expression

gcc/c/ChangeLog:
* c-parser.c (c_parser_postfix_expression): Use EXPR_LOC_OR_LOC
to preserve range information for the primary expression
in the call to c_parser_postfix_expression_after_primary.

gcc/testsuite/ChangeLog:
* gcc.dg/cast-function-1.c (bar): Update column numbers.
* gcc.dg/diagnostic-range-bad-called-object.c: New test case.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@231709 138bc75d-0d04-0410-961f-82ee72b054a4
gcc/c/ChangeLog
gcc/c/c-parser.c
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.dg/cast-function-1.c
gcc/testsuite/gcc.dg/diagnostic-range-bad-called-object.c [new file with mode: 0644]