Hello,
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.
Is this an error on Clang's side?
Dmitri