This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug inline-asm/32811] New: Cannot flag inline assembler code "noreturn"


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]