This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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


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 at ticam dot utexas dot edu
                              www: http://www.ticam.utexas.edu/~bangerth/



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]