http://llvm.org/bugs/show_bug.cgi?id=15695
Bug ID: 15695
Summary: #pragma weak foo = bar and 'extern foo' are ambiguous
Product: clang
Version: trunk
Hardware: PC
OS: Linux
Status: NEW
Severity: normal
Priority: P
Component: Frontend
Assignee: [email protected]
Reporter: [email protected]
CC: [email protected], [email protected]
Classification: Unclassified
GCC 4.7.2 compiles the following program:
extern int PFoo(int);
#pragma weak PFoo = Foo
int Foo(int a) { return a; }
int main() {
return PFoo(1);
}
while Clang emits an error:
$ clang weak.c
weak.c:5:8: error: call to 'PFoo' is ambiguous
return PFoo(1);
^~~~
weak.c:1:12: note: candidate function
extern int PFoo(int);
^
weak.c:2:14: note: candidate function
#pragma weak PFoo = Foo
^
1 error generated.
--
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