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

Mark Mitchell mark at codesourcery.com
Mon Sep 27 23:44:32 UTC 2004


Dennis Handly wrote:

>>From: Mark Mitchell <mark at codesourcery.com>
>>It seems to me that a POD with a pointer-to-member data member should 
>>not be a "POD for purpose of layout" because the layout of a "POD for 
>>the purpose of layout" is supposed to be whatever the C ABI would 
>>require -- and the C ABI does not specify the layout of a type 
>>containing a pointer-to-member.
>>    
>>
>
>I don't see that in:
>   http://www.codesourcery.com/cxx-abi/abi.html#POD
>
>I read it as a "POD for the purpose of layout" is a POD except with
>bit fields wider than the type.  Nothing about being C.
>  
>
If it is a POD for the purpose of layout, then Section 2.2 says that you 
do layout as specified by the C ABI.  You cannot do that for a type 
containing a pointer-to-member.  The reason that types with extra-long 
bitfields are not considered PODs for the purpose of layout is precisely 
this fact; if extra-long bitfields were part of C, there wouldn't be 
special rules in the ABI to handle them.

So, you're right that the ABI as written does not say that a POD for the 
purpose of layout must be a C type, but that is in fact the reason 
behind the definition.

-- 
Mark Mitchell
CodeSourcery, LLC
(916) 791-8304
mark at codesourcery.com




More information about the cxx-abi-dev mailing list