[cxx-abi-dev] C++0x POD

Dennis Handly dhandly at cup.hp.com
Thu Jul 16 08:06:58 UTC 2009


>From: Jason Merrill <jason at redhat.com>
>C++0x is changing the definition of POD again; most significantly, a POD 
>can now have non-public data members, base classes, and non-default/copy 
>constructors.
>How do we want to deal with this?

It seems we want to freeze the definition of a "POD" and use that.
For our compiler, we don't care about non-public data members.
But base classes, and non-default/copy constructors will make a difference.

>From: Mark Mitchell <mark at codesourcery.com>
>I think we want to preserve ABI compatibility, even if that's suboptimal
>for performance in some way.

Right.  What cases do you think it will be suboptimal?

>From: Gabriel Dos Reis <gdr at integrable-solutions.net>
>One of the purposes of the change is to have simple classes like
>complex<double> acts like PODs for argument function calls (e.g. use
>registers.) but without compromising guarantees made by C++03.

Why wouldn't this be a POD?  The copy constructor?

>From: Mark Mitchell <mark at codesourcery.com>
>So, are you suggesting we *should* change the ABI, and thereby break
>binary compatibility for existing programs?

Right, that's not a good idea.

>From: Jason Merrill <jason at redhat.com>
>I'm trying to find the requirement in the standard referred to by 
>"Because the C++ standard requires that compilers not overlay the tail 
>padding in a POD, using the C++98 definition in this ABI would prevent a 

I thought we need to fill in that padding?

>From: Jason Merrill <jason at redhat.com>
>but I see that EDG also allocates 12 bytes.

Right.



More information about the cxx-abi-dev mailing list