[Bug target/53633] __attribute__((naked)) should disable -Wreturn-type
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=53633 --- Comment #7 from rsandifo at gcc dot gnu.org --- Author: rsandifo Date: Sun Jul 21 09:42:41 2019 New Revision: 273642 URL: https://gcc.gnu.org/viewcvs?rev=273642&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-21 Richard Sandiford gcc/c/ Backport from mainline 2019-07-18 Richard Sandiford PR c/53633 * c-decl.c (finish_function): Check targetm.warn_func_return before issuing a -Wreturn-type warning. gcc/testsuite/ Backport from mainline 2019-07-18 Richard Sandiford * c-c++-common/pr53633-2.c: New test. Added: branches/gcc-8-branch/gcc/testsuite/c-c++-common/pr53633-2.c Modified: branches/gcc-8-branch/gcc/c/ChangeLog branches/gcc-8-branch/gcc/c/c-decl.c branches/gcc-8-branch/gcc/testsuite/ChangeLog
[Bug target/53633] __attribute__((naked)) should disable -Wreturn-type
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=53633 --- Comment #6 from rsandifo at gcc dot gnu.org --- Author: rsandifo Date: Sat Jul 20 18:50:20 2019 New Revision: 273635 URL: https://gcc.gnu.org/viewcvs?rev=273635&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-20 Richard Sandiford gcc/c/ Backport from mainline 2019-07-18 Richard Sandiford PR c/53633 * c-decl.c (finish_function): Check targetm.warn_func_return before issuing a -Wreturn-type warning. gcc/testsuite/ Backport from mainline 2019-07-18 Richard Sandiford * c-c++-common/pr53633-2.c: New test. Added: branches/gcc-9-branch/gcc/testsuite/c-c++-common/pr53633-2.c Modified: branches/gcc-9-branch/gcc/c/ChangeLog branches/gcc-9-branch/gcc/c/c-decl.c branches/gcc-9-branch/gcc/testsuite/ChangeLog
[Bug target/53633] __attribute__((naked)) should disable -Wreturn-type
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=53633 --- Comment #5 from rsandifo at gcc dot gnu.org --- 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 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
[Bug target/53633] __attribute__((naked)) should disable -Wreturn-type
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53633 Ramana Radhakrishnan changed: What|Removed |Added Status|UNCONFIRMED |RESOLVED CC||ramana at gcc dot gnu.org Resolution||FIXED Target Milestone|--- |4.8.0 --- Comment #4 from Ramana Radhakrishnan 2012-11-28 03:33:49 UTC --- fixed on trunk from what I can see.
[Bug target/53633] __attribute__((naked)) should disable -Wreturn-type
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53633 --- Comment #3 from sandra at gcc dot gnu.org 2012-07-25 18:08:11 UTC --- Author: sandra Date: Wed Jul 25 18:08:06 2012 New Revision: 189860 URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=189860 Log: 2012-07-25 Sandra Loosemore Paul Brook 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. Added: trunk/gcc/testsuite/c-c++-common/pr53633.c Modified: trunk/gcc/ChangeLog trunk/gcc/config/arm/arm.c trunk/gcc/config/avr/avr.c trunk/gcc/config/mcore/mcore.c trunk/gcc/config/rx/rx.c trunk/gcc/config/spu/spu.c trunk/gcc/cp/ChangeLog trunk/gcc/cp/decl.c trunk/gcc/doc/sourcebuild.texi trunk/gcc/doc/tm.texi trunk/gcc/doc/tm.texi.in trunk/gcc/ipa-pure-const.c trunk/gcc/target.def trunk/gcc/testsuite/ChangeLog trunk/gcc/testsuite/lib/target-supports.exp trunk/gcc/tree-cfg.c
[Bug target/53633] __attribute__((naked)) should disable -Wreturn-type
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53633 Sandra Loosemore changed: What|Removed |Added CC||sandra at codesourcery dot ||com --- Comment #2 from Sandra Loosemore 2012-07-21 20:06:29 UTC --- Paul Brook previously posted a patch for this, but it was never completed or committed: http://gcc.gnu.org/ml/gcc-patches/2010-06/msg01088.html I'm going to see if I can do anything to address the previous review comments. Also, that patch doesn't address similar problems in the C++ front end.
[Bug target/53633] __attribute__((naked)) should disable -Wreturn-type
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53633 Andrew Pinski changed: What|Removed |Added Target||arm*-*-* Component|c |target --- Comment #1 from Andrew Pinski 2012-06-11 18:23:04 UTC --- I think it was a bad idea we even added the attribute naked in the first place.