Actions

icon Post
text/html Subscribe
text/html Unsubscribe

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


  • To: Mark Mitchell <mark@xxxxxxxxxxxxxxxx>
  • Subject: Re: [cxx-abi-dev] What is a POD? TC1 or first C++ Standard
  • From: Nathan Sidwell <nathan@xxxxxxxxxxxxxxxx>
  • Date: Mon, 27 Sep 2004 09:00:42 +0100

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@xxxxxxxxxxxxxxxx    ::     http://www.planetfall.pwp.blueyonder.co.uk