[LLVMbugs] [Bug 15695] New: #pragma weak foo = bar and 'extern foo' are ambiguous
bugzilla-daemon at llvm.org
bugzilla-daemon at llvm.org
Sun Apr 7 07:07:13 PDT 2013
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: unassignedclangbugs at nondot.org
Reporter: gribozavr at gmail.com
CC: llvmbugs at cs.uiuc.edu, rafael.espindola at gmail.com
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.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20130407/28046e51/attachment.html>
More information about the llvm-bugs
mailing list