[LLVMbugs] [Bug 5402] New: attribute noreturn doesn' t work if specified in front of a function pointer decl

bugzilla-daemon at cs.uiuc.edu bugzilla-daemon at cs.uiuc.edu
Thu Nov 5 11:27:06 PST 2009


http://llvm.org/bugs/show_bug.cgi?id=5402

           Summary: attribute noreturn doesn't work if specified in front of
                    a function pointer decl
           Product: clang
           Version: trunk
          Platform: PC
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P2
         Component: parser
        AssignedTo: unassignedclangbugs at nondot.org
        ReportedBy: benny.kra at gmail.com
                CC: llvmbugs at cs.uiuc.edu, mrs at apple.com


test case:

#define NORETURN __attribute__((__noreturn__))

NORETURN void (*a)();
void (*b)() NORETURN;

NORETURN void x() {
  a();
}

NORETURN void y() {
  b();
}

clang complains:
t.c:8:1: warning: function declared 'noreturn' should not return
[-Winvalid-noreturn]
}
^


-- 
Configure bugmail: http://llvm.org/bugs/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.



More information about the llvm-bugs mailing list