http://llvm.org/bugs/show_bug.cgi?id=10347
Summary: Clang permits implicit conversion to 'noreturn'
function pointer in C
Product: clang
Version: trunk
Platform: PC
OS/Version: All
Status: NEW
Keywords: accepts-invalid
Severity: normal
Priority: P
Component: Frontend
AssignedTo: [email protected]
ReportedBy: [email protected]
CC: [email protected]
Clang accepts this code in C mode:
int add(int);
void f0(__attribute__((noreturn)) int (*)(int));
void f1() {
f0(&add);
}
but it should not, since it is unsafe to treat a pointer to a
possibly-returning function pointer as a function pointer that is known not to
return. We properly diagnose this in C++ mode.
--
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