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]

r273568 - in /trunk/gcc: c/ChangeLog c/c-decl.c...


Author: rsandifo
Date: Thu Jul 18 08:22:50 2019
New Revision: 273568

URL: https://gcc.gnu.org/viewcvs?rev=273568&root=gcc&view=rev
Log:
Fix -Wreturn-type for static naked functions in C

This patch extends the fix for PR53633 to include static functions,
which were giving a bogus -Wreturn-type warning for C but not for C++.

2019-07-18  Richard Sandiford  <richard.sandiford@arm.com>

gcc/c/
	PR c/53633
	* c-decl.c (finish_function): Check targetm.warn_func_return
	before issuing a -Wreturn-type warning.

gcc/testsuite/
	* c-c++-common/pr53633-2.c: New test.

Added:
    trunk/gcc/testsuite/c-c++-common/pr53633-2.c
Modified:
    trunk/gcc/c/ChangeLog
    trunk/gcc/c/c-decl.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]