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

Mark Mitchell mark at codesourcery.com
Fri Sep 24 16:12:37 UTC 2004


Dennis Handly wrote:

>>GCC is not going to change back to the pre-TC1 definition, even for
>>return values
>>    
>>
>
>What do you mean by "return values"?  I said it only affects layout.
>I first thought it also affects them but 3.1.4 Return Values, says nothing
>about PODs.
>  
>
You are correct.  I thought it said that non-PODs could not be 
passed/returned in registers, but, in fact, it is more specific: it 
talks about non-trivial copy constructors and destructors.

That makes things somewhat simpler.

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.

Now, the question is, when would this make a difference?  Dennis, can 
you post a small test case showing where the layout is different 
depending on whether you use the TC1 or pre-TC1 definition of POD?

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




More information about the cxx-abi-dev mailing list