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

           Summary: C++ static initialization order problem
           Product: libraries
           Version: trunk
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Linker
        AssignedTo: [email protected]
        ReportedBy: [email protected]
                CC: [email protected]


Due to the order of static initialization being undefined in C++ I get a
problem where g_symbol is not initialized when it is used for the first time.

According to cppreference.com one can work around this issue by moving the uses
of g_symbol into a accessor method. This is what I did in the attached patch
and that solved my issue.


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