New g++ ABI

Joe Buck jbuck@synopsys.com
Wed Apr 8 09:37:00 GMT 1998


> > D *d;
> > A *a, *b;
> 
> > *a = *b; // should perform a default memberwise copy of the A portion
> > 	 // of the object addressed.  The compiler generated version
> > 	 // might look like: memcpy (..., ..., sizeof (A));
> 
> Agreed.  I think I'll limit the optimization to classes with nontrivial
> copy constructors and copy assignment operators, since they will be doing
> true memberwise copies anyway.

The optimization is also allowed for empty base classes, since presumably
the compiler-generated copy ctors and assign ops do nothing in that
case.




More information about the Gcc mailing list