What is a POD? TC1 or first C++ Standard

Dennis Handly dhandly at cup.hp.com
Fri Sep 24 03:15:32 UTC 2004


We just noticed that the definition of a POD has change in TC1.
The Original Standard disallowed pointers to members in PODs.

If everyone implements this change then the ABI changes everywhere it
depends on PODs.  2.2 POD Data Types and 2.4 Non-POD Class Types.
This section does mention "POD for the purpose of layout", but that only
addresses bitfields.

Does the ABI need to say which Standard is implemented?
Should it say that PODs are the original definition so that binary
compatibility is maintained?

Or do we just have to say this is all messed up and that the definition
of a POD should have been an ABI-POD, that was frozen?

To meet strict ABI compatibility and Standard requirements, an
implementation should use the old POD definition for layouts and use the
new definition for default initialization, 8.5(5).  And for new FOO() or
FOO() in initializer lists.

(It seems 3.1.4 Return Values doesn't mention PODs at all, so no issues
there.)



More information about the cxx-abi-dev mailing list