re PR c/61162 (possibly bad error location with -Wc++-compat)
authorMarek Polacek <polacek@redhat.com>
Wed, 25 Jun 2014 12:43:05 +0000 (12:43 +0000)
committerMarek Polacek <mpolacek@gcc.gnu.org>
Wed, 25 Jun 2014 12:43:05 +0000 (12:43 +0000)
commit6e07c515168d331a0e05673b7994a5b189ef112f
treeea22f21c816c1c646178ef9c6cf317e21cc4dec6
parent20cb2258ecac9c5cb651889966ac46f6958aec95
re PR c/61162 (possibly bad error location with -Wc++-compat)

PR c/61162
* c-parser.c (c_parser_statement_after_labels): Pass the location of
the return expression to c_finish_return.

* gcc.dg/pr61162.c: Adjust dg-warning.
* gcc.dg/pr61162-2.c: New test.

From-SVN: r211978
gcc/c/ChangeLog
gcc/c/c-parser.c
gcc/c/c-typeck.c
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.dg/pr61162-2.c [new file with mode: 0644]
gcc/testsuite/gcc.dg/pr61162.c