[PATCH] PR target/53633; disable return value warnings for naked functions

Sandra Loosemore sandra@codesourcery.com
Wed Jul 25 18:12:00 GMT 2012


On 07/25/2012 09:57 AM, Richard Henderson wrote:
> 
> I'll echo Nick's comments about arm asm in a common test.
> There's no need to have anything but __asm__(""); there.
> 
> Ok with that change.

Thanks!  Here's the version I committed.

-Sandra


2012-07-25  Sandra Loosemore  <sandra@codesourcery.com>
	    Paul Brook  <paul@codesourcery.com>

	PR target/53633

	gcc/
	* target.def (warn_func_return): New hook.
	* doc/tm.texi.in (TARGET_WARN_FUNC_RETURN): New hook.
	* doc/tm.texi: Regenerate.
	* doc/sourcebuild.texi (Effective-Target Keywords): Document
	naked_functions.
	* ipa-pure-const.c (warn_function_noreturn): Check
	targetm.warn_func_return.
	* tree-cfg.c (execute_warn_function_return): Likewise.
	* config/spu/spu.c (spu_warn_func_return): New.
	(TARGET_WARN_FUNC_RETURN): Define.
	* config/rx/rx.c (rx_warn_func_return): New.
	(TARGET_WARN_FUNC_RETURN): Define.
	* config/avr/avr.c (avr_warn_func_return): New.
	(TARGET_WARN_FUNC_RETURN): Define.
	* config/arm/arm.c (arm_warn_func_return): New.
	(TARGET_WARN_FUNC_RETURN): Define.
	* config/mcore/mcore.c (mcore_warn_func_return): New.
	(TARGET_WARN_FUNC_RETURN): Define.
	(saved_warn_return_type, saved_warn_return_type_count): Remove.
	(mcore_reorg, mcore_handle_naked_attribute): Remove warn_return hack.

	gcc/cp/
	* decl.c (finish_function): Check targetm.warn_func_return.

	gcc/testsuite/
	* lib/target-suports.exp (check_effective_target_naked_functions):
	New.
	* c-c++-common/pr53633.c: New test.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: naked2.patch
Type: text/x-patch
Size: 13304 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20120725/9d1518c6/attachment.bin>


More information about the Gcc-patches mailing list