[LLVMbugs] [Bug 11521] New: order of static constructors wrong
bugzilla-daemon at llvm.org
bugzilla-daemon at llvm.org
Fri Dec 9 07:08:10 PST 2011
http://llvm.org/bugs/show_bug.cgi?id=11521
Bug #: 11521
Summary: order of static constructors wrong
Product: clang
Version: unspecified
Platform: PC
OS/Version: All
Status: NEW
Severity: enhancement
Priority: P
Component: C++
AssignedTo: unassignedclangbugs at nondot.org
ReportedBy: ich at az2000.de
CC: dgregor at apple.com, llvmbugs at cs.uiuc.edu
Classification: Unclassified
In the example [here](https://gist.github.com/1451848), I would expect that the
constructor of `rnd` is called first and then the function `_rand_engine__init`
(via `__attribute__((constructor))`).
However, from the output, I can see that this is not the case.
I'm not exactly sure wether this is really a bug or if the doc leaves this
undefined. However, from the GCC docs (summarized
[here](http://stackoverflow.com/a/8433525/133374)), it seems that my expected
behavior should have been the one.
--
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