[cxx-abi] Re: [cxx-abi-dev] Tail padding, in sumary

Nelson, Clark clark.nelson at intel.com
Mon Aug 26 15:08:42 UTC 2002


it, so I'll add
> Although that would be an excellent solution, there'd be some 
> awkwardness
> explaining that C has a different layout to B
> 	struct B : A { int j : 2;};
> At the momement, they should have the same layout.

So in a case like this:

struct X { int x: 1; };
struct Y { struct X x; int y: 1; };

I think it would be far more awkward to explain that you can't copy the x
member using memcpy without running the risk of modifying y. Note that this
case is expressible in C. Surely the base (C) ABI doesn't have x and y
overlapping at the byte level.

For what it's worth, I never read the ABI as saying that this should be the
case. Could someone please point out the words I'm missing?

--
Clark Nelson
Intel Corporation
clark.nelson at intel.com
 



More information about the cxx-abi-dev mailing list