[LLVMbugs] [Bug 3424] New: C++ static initialization order problem
bugzilla-daemon at cs.uiuc.edu
bugzilla-daemon at cs.uiuc.edu
Tue Jan 27 04:28:02 PST 2009
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: unassignedbugs at nondot.org
ReportedBy: thebohemian at gmx.net
CC: llvmbugs at cs.uiuc.edu
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.
More information about the llvm-bugs
mailing list