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

Gabriel Dos Reis gdr at integrable-solutions.net
Wed Jul 15 18:02:40 UTC 2009


On Wed, Jul 15, 2009 at 12:44 PM, Mark Mitchell<mark at codesourcery.com> wrote:
> Gabriel Dos Reis wrote:
>
>>> I think we want to preserve ABI compatibility, even if that's suboptimal
>>> for performance in some way.  The ABI already has a definition of "POD
>>> for purpose of layout"; we should check that it still means what it
>>> defines the same set of types that it did before.  And, check that
>>> POD-ness doesn't appear elsewhere in the ABI.  (I couldn't find any
>>> other places with a quick check.)
>>
>> 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.
>
> So, are you suggesting we *should* change the ABI, and thereby break
> binary compatibility for existing programs?
>
> If so, I disagree.  One of the biggest barriers to adoption of C++
> continues to be binary compatibility between different compilers and
> between releases of compilers.  If compiling programs that don't use
> C++0x features, or use C++0x features that don't require ABI changes,
> result in incompatible binaries, I think that would be unfortunate.

The POD change is a C++0x feature which was actively sought for.

Moreover, my message was an explanation of some of the concrete
motivations behind the C++0x change (some of them prompted by a
dissatisfaction of some aspects of the current ABI which relies on
the current POD definition).  Of course, people are free to ignore the
feedback (through a change of POD definition).  Whether that would
continue to hurt C++ more, given that the ABI would change anyway is
something that we'd see in say 10 years.

-- Gaby



More information about the cxx-abi-dev mailing list