This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug inline-asm/32811] New: Cannot flag inline assembler code "noreturn"
- From: "us15 at os dot inf dot tu-dresden dot de" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 18 Jul 2007 17:46:47 -0000
- Subject: [Bug inline-asm/32811] New: Cannot flag inline assembler code "noreturn"
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
For a function declared "noreturn" the compiler cannot verify that inline
assembler code in the function body indeed does not return and therefore
produces the warning "'noreturn' function does return". I would like a
mechanism to tell the compiler that an inline assembler statement makes a
function "noreturn" without the overhead of adding an endless loop at the end
of the function. Something like: asm volatile ("...") __attribute__((noreturn))
An example:
__attribute__((noreturn))
void func()
{
asm volatile ("1: jmp 1b");
}
int main()
{
func();
return 0;
}
--
Summary: Cannot flag inline assembler code "noreturn"
Product: gcc
Version: 4.3.0
Status: UNCONFIRMED
Severity: minor
Priority: P3
Component: inline-asm
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: us15 at os dot inf dot tu-dresden dot de
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=32811