diff options
author | sandra <sandra@138bc75d-0d04-0410-961f-82ee72b054a4> | 2012-07-25 18:08:06 +0000 |
---|---|---|
committer | sandra <sandra@138bc75d-0d04-0410-961f-82ee72b054a4> | 2012-07-25 18:08:06 +0000 |
commit | 08c6cbd2f55bbb046e5ec82a8933fbd662b4009d (patch) | |
tree | f42803034e2d99c0fb7f313962516557837e0a57 /gcc/config/spu | |
parent | ae0426ce089b6f8f536d0b516dc314785360fc7d (diff) | |
download | gcc-08c6cbd2f55bbb046e5ec82a8933fbd662b4009d.tar.gz |
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.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@189860 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/config/spu')
-rw-r--r-- | gcc/config/spu/spu.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/gcc/config/spu/spu.c b/gcc/config/spu/spu.c index cdae4d861b1..2d5405d99f6 100644 --- a/gcc/config/spu/spu.c +++ b/gcc/config/spu/spu.c @@ -5881,6 +5881,14 @@ spu_trampoline_init (rtx m_tramp, tree fndecl, rtx cxt) emit_insn (gen_sync ()); } +static bool +spu_warn_func_return (tree decl) +{ + /* Naked functions are implemented entirely in assembly, including the + return sequence, so suppress warnings about this. */ + return !spu_naked_function_p (decl); +} + void spu_expand_sign_extend (rtx ops[]) { @@ -7272,6 +7280,9 @@ static const struct attribute_spec spu_attribute_table[] = #undef TARGET_TRAMPOLINE_INIT #define TARGET_TRAMPOLINE_INIT spu_trampoline_init +#undef TARGET_WARN_FUNC_RETURN +#define TARGET_WARN_FUNC_RETURN spu_warn_func_return + #undef TARGET_OPTION_OVERRIDE #define TARGET_OPTION_OVERRIDE spu_option_override |