This is the mail archive of the gcc-cvs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

r231786 - in /trunk/gcc: c/ChangeLog c/c-parser...


Author: dmalcolm
Date: Thu Dec 17 21:25:36 2015
New Revision: 231786

URL: https://gcc.gnu.org/viewcvs?rev=231786&root=gcc&view=rev
Log:
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.

Added:
    trunk/gcc/testsuite/gcc.dg/diagnostic-range-bad-return.c
Modified:
    trunk/gcc/c/ChangeLog
    trunk/gcc/c/c-parser.c
    trunk/gcc/c/c-typeck.c
    trunk/gcc/testsuite/ChangeLog


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]