http://llvm.org/bugs/show_bug.cgi?id=15463
Bug ID: 15463
Summary: Accepts invalid function with external linkage and
type with no linkage
Product: clang
Version: unspecified
Hardware: PC
OS: Linux
Status: NEW
Severity: enhancement
Priority: P
Component: C++11
Assignee: [email protected]
Reporter: [email protected]
CC: [email protected], [email protected]
Classification: Unclassified
The c++ standard says:
A type without linkage shall not be used as the type of a variable or function
with external linkage unless
— the entity has C language linkage (7.5), or
— the entity is declared within an unnamed namespace (7.3.1), or
— the entity is not odr-used (3.2) or is defined in the same translation unit.
but we accept
typedef struct {
void *foo() { return 0; }
} *A;
void test(A a);
void zed() {
test(0);
}
--
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