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

             Bug #: 14991
           Summary: attribute init_priority() should trigger warning on OS
                    X
           Product: clang
           Version: 3.1
          Platform: Macintosh
        OS/Version: MacOS X
            Status: NEW
          Severity: normal
          Priority: P
         Component: C++
        AssignedTo: [email protected]
        ReportedBy: [email protected]
                CC: [email protected], [email protected]
    Classification: Unclassified


After several tests I discovered that the standard Apple linker does not
support reordering of constructors.

GCC has a configuration definition 

#define SUPPORTS_INIT_PRIORITY 0

that triggers errors when attributes like

__attribute__((constructor(NNN)))
__attribute__ ((init_priority (NNN)))

are used:

OS.cpp:16:57: error: constructor priorities are not supported
OS.cpp:35:59: error: 'init_priority' attribute is not supported on this
platform

I think that clang should also trigger warnings, to notify the user that those
attributes, although properly processed within the compilation unit, will be
silently ignored by the Apple linker.


Liviu

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