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

            Bug ID: 17640
           Summary: clang should reject mixing #pragma weak and aliases
           Product: clang
           Version: unspecified
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: Frontend
          Assignee: [email protected]
          Reporter: [email protected]
                CC: [email protected]
    Classification: Unclassified

gcc rejects

void foo(void) __attribute((alias("__foo")));
#pragma weak foo = __foo
void __foo(void) {}

#pragma weak bar = __bar
void bar(void) __attribute((alias("__bar")));
void __bar(void) {}

with

test.c:10:6: error: ‘foo’ defined both normally and as ‘alias’ attribute
 void foo(void) __attribute((alias("__foo")));
      ^
test.c:16:6: error: ‘bar’ defined both normally and as ‘alias’ attribute
 void bar(void) __attribute((alias("__bar")));

we should reject it too.

-- 
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