[LLVMbugs] [Bug 15305] New: clang accepts __attribute__ in more places than gcc

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Tue Feb 19 16:24:04 PST 2013


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

            Bug ID: 15305
           Summary: clang accepts __attribute__ in more places than gcc
           Product: clang
           Version: unspecified
          Hardware: PC
                OS: All
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: Frontend
          Assignee: unassignedclangbugs at nondot.org
          Reporter: rafael.espindola at gmail.com
                CC: llvmbugs at cs.uiuc.edu
    Classification: Unclassified

Gcc accepts __attribute__((visibility("hidden"))) anywhere it accepts 'static.
So it accepts

int __attribute__((visibility("hidden"))) foo() {
}

but rejects

int* __attribute__((visibility("hidden"))) bar() {
}

clang accepts both (but agrees with gcc as to where 'static' can be).

Not sure if this is an intended extension or not, but it can cause problems in
codebases where clang is the main compiler but gcc is still supported (as with
clang itself).

-- 
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/20130220/b85254bc/attachment.html>


More information about the llvm-bugs mailing list