-
Notifications
You must be signed in to change notification settings - Fork 13k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
missing error detection in support for variable alias attribute #7108
Comments
As an alternative, we might try to accept this weirdness, btu do syntax checking and emit a gep |
That sounds scary to me, we should just require it to be an identifier. Doing anything more complex will be really fragile. Also, relying on it to "pop out to the assembler and just work" won't work with an integrated assembler. |
|
Sounds right to me. |
Fixed in Clang 3.4 |
@llvm/issue-subscribers-clang-frontend |
[🌲] Muting llvm::None warning in Swift for now
Extended Description
There is and attribute to specify variable to be alias of another variable
attribute ((alias ("variable2")));
This makes this variable alias to location variable2
It seems that the correctness of the symbol where the alias is created is not checked in clang:
attribute ((alias ("variable2 + 2")));
should cause a compiler error, but it passes, and creates a bogus reference to a variable named "variable2 + 2".
At least newlib seems to use this broken syntax(because gcc can actually do the calculation), which then goes thru configure check(because the error is not detected when compiling) but fails on actual linking, which causes newlib to not work when compiled with clang.
The text was updated successfully, but these errors were encountered: