This is the mail archive of the gcc@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++ ABI Issues




--On Tuesday, August 27, 2002 03:17:31 AM +0100 Jamie Lokier <egcs@tantalophile.demon.co.uk> wrote:

Mark Mitchell wrote:
   G++ incorrectly packs D::i2 into the four bits of tail-padding in
   B.

   This is not only an ABI divergence, but also an optimization issue.
   G++ generates a copy-constructor for B that performs the bit-masking
   operations required to copy only the bitfield at the end of B, which
   is more expensive than copying the entire word.
Is there any scenario where the bit-masking is actually necessary?
It is necessary in an assignment operator.

--
Mark Mitchell                mark@codesourcery.com
CodeSourcery, LLC            http://www.codesourcery.com


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