public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c/53633] New: __attribute__((naked)) should disable -Wreturn-type
@ 2012-06-11 11:53 Bernhard.Rosenkranzer at linaro dot org
2012-06-11 18:23 ` [Bug target/53633] " pinskia at gcc dot gnu.org
` (3 more replies)
0 siblings, 4 replies; 5+ messages in thread
From: Bernhard.Rosenkranzer at linaro dot org @ 2012-06-11 11:53 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53633
Bug #: 53633
Summary: __attribute__((naked)) should disable -Wreturn-type
Classification: Unclassified
Product: gcc
Version: 4.8.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c
AssignedTo: unassigned@gcc.gnu.org
ReportedBy: Bernhard.Rosenkranzer@linaro.org
This code:
__attribute__((naked))
int test() {
asm("mov r0, #1");
}
triggers a "control reaches end of non-void function" warning (or error, if
-Werror is used).
IMO this warning should be omitted, given __attribute__((naked)) is meant to
tell the compiler that asm code inside takes care of everything.
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug target/53633] __attribute__((naked)) should disable -Wreturn-type
2012-06-11 11:53 [Bug c/53633] New: __attribute__((naked)) should disable -Wreturn-type Bernhard.Rosenkranzer at linaro dot org
@ 2012-06-11 18:23 ` pinskia at gcc dot gnu.org
2012-07-21 20:06 ` sandra at codesourcery dot com
` (2 subsequent siblings)
3 siblings, 0 replies; 5+ messages in thread
From: pinskia at gcc dot gnu.org @ 2012-06-11 18:23 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53633
Andrew Pinski <pinskia at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Target| |arm*-*-*
Component|c |target
--- Comment #1 from Andrew Pinski <pinskia at gcc dot gnu.org> 2012-06-11 18:23:04 UTC ---
I think it was a bad idea we even added the attribute naked in the first place.
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug target/53633] __attribute__((naked)) should disable -Wreturn-type
2012-06-11 11:53 [Bug c/53633] New: __attribute__((naked)) should disable -Wreturn-type Bernhard.Rosenkranzer at linaro dot org
2012-06-11 18:23 ` [Bug target/53633] " pinskia at gcc dot gnu.org
@ 2012-07-21 20:06 ` sandra at codesourcery dot com
2012-07-25 18:08 ` sandra at gcc dot gnu.org
2012-11-28 3:34 ` ramana at gcc dot gnu.org
3 siblings, 0 replies; 5+ messages in thread
From: sandra at codesourcery dot com @ 2012-07-21 20:06 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53633
Sandra Loosemore <sandra at codesourcery dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |sandra at codesourcery dot
| |com
--- Comment #2 from Sandra Loosemore <sandra at codesourcery dot com> 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.
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug target/53633] __attribute__((naked)) should disable -Wreturn-type
2012-06-11 11:53 [Bug c/53633] New: __attribute__((naked)) should disable -Wreturn-type Bernhard.Rosenkranzer at linaro dot org
2012-06-11 18:23 ` [Bug target/53633] " pinskia at gcc dot gnu.org
2012-07-21 20:06 ` sandra at codesourcery dot com
@ 2012-07-25 18:08 ` sandra at gcc dot gnu.org
2012-11-28 3:34 ` ramana at gcc dot gnu.org
3 siblings, 0 replies; 5+ messages in thread
From: sandra at gcc dot gnu.org @ 2012-07-25 18:08 UTC (permalink / raw)
To: gcc-bugs
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 <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.
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
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug target/53633] __attribute__((naked)) should disable -Wreturn-type
2012-06-11 11:53 [Bug c/53633] New: __attribute__((naked)) should disable -Wreturn-type Bernhard.Rosenkranzer at linaro dot org
` (2 preceding siblings ...)
2012-07-25 18:08 ` sandra at gcc dot gnu.org
@ 2012-11-28 3:34 ` ramana at gcc dot gnu.org
3 siblings, 0 replies; 5+ messages in thread
From: ramana at gcc dot gnu.org @ 2012-11-28 3:34 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53633
Ramana Radhakrishnan <ramana at gcc dot gnu.org> 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 <ramana at gcc dot gnu.org> 2012-11-28 03:33:49 UTC ---
fixed on trunk from what I can see.
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2012-11-28 3:34 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-06-11 11:53 [Bug c/53633] New: __attribute__((naked)) should disable -Wreturn-type Bernhard.Rosenkranzer at linaro dot org
2012-06-11 18:23 ` [Bug target/53633] " pinskia at gcc dot gnu.org
2012-07-21 20:06 ` sandra at codesourcery dot com
2012-07-25 18:08 ` sandra at gcc dot gnu.org
2012-11-28 3:34 ` ramana at gcc dot gnu.org
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).