 |
|
|
|
Actions
|
|
[ Date Prev][ Date Next][ Thread Prev][ Thread Next][ Date Index][ Thread Index]
Re: [cxx-abi-dev] What is a POD? TC1 or first C++ Standard
- To: Dennis Handly <dhandly@xxxxxxxxxx>
- Subject: Re: [cxx-abi-dev] What is a POD? TC1 or first C++ Standard
- From: Mark Mitchell <mark@xxxxxxxxxxxxxxxx>
- Date: Mon, 27 Sep 2004 16:44:32 -0700
Dennis Handly wrote:
From: Mark Mitchell <mark@xxxxxxxxxxxxxxxx>
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@xxxxxxxxxxxxxxxx
|
|