http://llvm.org/bugs/show_bug.cgi?id=5062
Summary: builtin_trap() does not set noreturn
Product: clang
Version: unspecified
Platform: PC
OS/Version: FreeBSD
Status: NEW
Severity: normal
Priority: P2
Component: Basic
AssignedTo: [email protected]
ReportedBy: [email protected]
CC: [email protected]
lev /tmp$ cat rw.c
void foo(void) __attribute__((__noreturn__));
void foo(void)
{
__builtin_trap();
}
lev /tmp$ gcc -c rw.c && echo yes
yes
lev /tmp$ clang -c rw.c && echo yes
rw.c:6:1: warning: function declared 'noreturn' should not return
[-Winvalid-noreturn]
}
^
1 diagnostic generated.
the attached patch fixes this.
--
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.
_______________________________________________
LLVMbugs mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/llvmbugs