------- Comment #2 from oschmidt at gmx dot net 2006-09-18 08:35 ------- > default operator= with lhs and rhs as the same.
if it would be the operator= this would be ok. But it's the default copy constructor that is called withed lhs and rhs the same and such an object with undefined content is constructed from random stack memory. > So which version do you think have a bug? I don't know which behaviour should be correct C++, but I think it is dangerous that an object with undefined content is constructed without even a compiler warning. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=29117