C FE: improvements to ranges of bad return values
gcc/c/ChangeLog:
* c-parser.c (c_parser_statement_after_labels): When calling
c_finish_return, Use the return expression's location if it has
one, falling back to the location of the first token within it.
* c-typeck.c (c_finish_return): When issuing warnings about
the incorrect presence/absence of a return value, issue a note
showing the declaration of the function.
gcc/testsuite/ChangeLog:
* gcc.dg/diagnostic-range-bad-return.c: New test case.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@231786
138bc75d-0d04-0410-961f-
82ee72b054a4