http://llvm.org/bugs/show_bug.cgi?id=6736

           Summary: missing error detection in support for variable alias
                    attribute
           Product: clang
           Version: 2.6
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: -New Bugs
        AssignedTo: [email protected]
        ReportedBy: [email protected]
                CC: [email protected]


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.

-- 
Configure bugmail: http://llvm.org/bugs/userprefs.cgi?tab=email
------- 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

Reply via email to