[cfe-dev] C++ objects sometimes initialized to zero before constructor is called?
Ryan C. Gordon
icculus at icculus.org
Mon Jul 30 17:49:09 PDT 2012
> Note that new B() triggers zero-initialization, because it calls a
> non-user-provided default constructor using empty parens. The other
> cases do not, either because they call a user-provided constructor or
> because they use default-initialization rather than value-initialization.
That was totally it! I removed a "()" from a macro, and now the whole
game is running when built with clang.
Thanks so much for a fast and detailed response. After reading this, I
was up and running within about 60 seconds. :)
--ryan.
More information about the cfe-dev
mailing list