[This question should have been sent to gcc-help, this list is for discussing development of GCC]
On 18 November 2010 03:03, Gilberto Cuba Ricardo wrote: > > Maybe it's possible, though, I searched in the working draft of > standard programming c++ of this year that: "Static initialization shall > be performed before any dynamic initialization takes place. Dynamic > initialization of non-local variable with static storage duration is either > ordered or unordered. Definitions of explicitly specialized class template > static data members have ordered initialization." That's not a non-local variable or a static data member. The relevant text is 6.7 [stmt.decl] p4 If control re-enters the declaration (recursively) while the object is being initialized, the behavior is undefined. [Example: int foo(int i) { static int s = foo(2*i); // recursive call – undefined return i+1; } —end example]