Quantcast

Confusing "Only weak aliases are supported on darwin" error message.

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Confusing "Only weak aliases are supported on darwin" error message.

Keane, Erich via cfe-dev
Hi,

I stumbled across a confusing error message that clang (3.9) gives
when it asked to compile this program

```
void g() {}
void f() __attribute__((weak, alias("g")));
```

Note this is a minor a variant of an existing test case [1].

When I try to compile the above program I see

```
clang -target x86_64-apple-darwin -emit-llvm -S attr-alias.c -o -
attr-alias.c:2:31: error: only weak aliases are supported on darwin
void f() __attribute__((weak, alias("g")));
                              ^
1 error generated.
```

This error message is really confusing to me. Surely f() is a weak
alias for g() because is has __attribute__((weak, alias("g")))) ?

CC'ing Rafael because it looks like r121137 is responsible for this.

[1] https://github.com/llvm-mirror/clang/blob/a0badfbffbee71c2c757d580fc852d2124dadc5a/test/Sema/attr-alias.c

Thanks,
Dan.
_______________________________________________
cfe-dev mailing list
[hidden email]
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev
Loading...