This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug libstdc++/39796] cin/cout/cerr constructors should run at high priority when possible
- From: "redi at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Tue, 03 Jan 2012 16:39:39 +0000
- Subject: [Bug libstdc++/39796] cin/cout/cerr constructors should run at high priority when possible
- Auto-submitted: auto-generated
- References: <bug-39796-4@http.gcc.gnu.org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=39796
Jonathan Wakely <redi at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Last reconfirmed| |2012-01-03
Ever Confirmed|0 |1
--- Comment #4 from Jonathan Wakely <redi at gcc dot gnu.org> 2012-01-03 16:39:39 UTC ---
http://stackoverflow.com/questions/8708539/order-of-initialization was brought
to my attention, which crashes without messing with init-priority
struct Foo
{
Foo();
}foo;
#include <iostream>
Foo::Foo()
{
std::cout << "Hello World";
}
int main() {}
So I'm confirming this as a valid enhancement.
PR 44952 might lead to a better way to ensure the initialization is done once
as early as possible.