c++/10112: static data member is not correctly initialized

Wolfgang Bangerth bangerth@ticam.utexas.edu
Tue Mar 18 00:28:00 GMT 2003


I think with this code, A::p1 is statically initialized (being a POD 
type), while B::a is dynamically initialized (having a user-defined 
constructor). I think I remember that the standard specifies that static 
initializers always run before dynamic ones, irrespective of the order in 
which they appear in the source file. In that case, this would not be a 
bug.

W.

-------------------------------------------------------------------------
Wolfgang Bangerth             email:            bangerth@ticam.utexas.edu
                              www: http://www.ticam.utexas.edu/~bangerth/




More information about the Gcc-bugs mailing list