------- Comment #158 from gdr at cs dot tamu dot edu 2007-05-24 10:47 ------- Subject: Re: [4.0/4.1/4.2/4.3 Regression] placement new does not change the dynamic type as it should
"rguenther at suse dot de" <[EMAIL PROTECTED]> writes: [...] | > Now, if I understand your argument below correctly, you are saying | > that even if we fixed the union rules for C++, we may still be facing | > the same problem because assignment to POD objects does not just mean | > that the object was there before, but that we are actually starting a | > new one. Do I understand your argument correctly? | | Yes. Then, I'm not sure I agree with that. I'll raise it as part of the union problem. | For non-PODs I'm not sure if it is allowed to start object | lifetime via assignment rather than only by placement new. Assignment for non-POD is equivalent to calling a member function for an object, which means that the object already existed. So, no you cannot start lifetime for object of non-POD type by assignment. -- Gaby -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=29286