[LLVMbugs] [Bug 17640] New: clang should reject mixing #pragma weak and aliases

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Mon Oct 21 13:04:09 PDT 2013


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: unassignedclangbugs at nondot.org
          Reporter: rafael.espindola at gmail.com
                CC: llvmbugs at cs.uiuc.edu
    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.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20131021/fb885df0/attachment.html>


More information about the llvm-bugs mailing list