[cxx-abi-dev] What is a POD? TC1 or first C++ Standard

Nathan Sidwell nathan at codesourcery.com
Mon Sep 27 08:00:42 UTC 2004


Mark Mitchell wrote:

> 
> Right, good.  Again, it looks like G++ 3.4 will treat A as a POD, 
> following TC1, and will therefore not place B::g in the tail padding for A.
> 
>  From what Dennis, says that sounds like G++ and aCC are incompatible in 
> this respect, but that G++ is probably compatible with (recent versions 
> of) EDG.  I'm not sure what the most equitable way to resolve the 
> ambiguity in the ABI specification is.

I recall some example along the lines of,

struct A
{
	T m;
	double d;
	char c;
	void copy_me (A const *s)
	{
		std::memcpy (this, s, sizeof (*this));
	}
};

being valid, so long as A is a POD -- i.e. T does not make it a non-pod.
If that is the case, we should not be reusing the tail padding of
any base class that the _language_ says should be POD.  For instance
when T is a ptr-to-member, or for that matter, when it is an overlong
bitfield.

nathan

-- 
Nathan Sidwell    ::   http://www.codesourcery.com   ::     CodeSourcery LLC
nathan at codesourcery.com    ::     http://www.planetfall.pwp.blueyonder.co.uk





More information about the cxx-abi-dev mailing list