This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: C++/v3 PATCH for libstdc++/37907 (POD -> standard-layout/trivial)
- From: "H.J. Lu" <hjl dot tools at gmail dot com>
- To: Jason Merrill <jason at redhat dot com>
- Cc: gcc-patches List <gcc-patches at gcc dot gnu dot org>, Benjamin Kosnik <bkoz at redhat dot com>
- Date: Thu, 11 Mar 2010 13:14:33 -0800
- Subject: Re: C++/v3 PATCH for libstdc++/37907 (POD -> standard-layout/trivial)
- References: <4A5F8ED2.5000002@redhat.com>
On Thu, Jul 16, 2009 at 12:34 PM, Jason Merrill <jason@redhat.com> wrote:
> Benjamin asked me to make PR 37907 a priority, and then the patch just kept
> growing...
>
> This patch implements the changes in the language's notion of POD type from
> the N2230. ?Basically, a POD is now a type which is both trivial (has
> trivial default init, copy init, copy assign and destructor) and
> standard-layout. ?Pretty much everything in the standard that used to talk
> about POD type now either refers to one of those properties, or to a subset
> of the trivial conditions, typically either default init/destructor or copy
> init/destructor.
>
> As a result, we now no longer give warnings/errors on a lot of cases where
> the language used to require them for no good reason, on offsetof, passing
> by ..., or jumping into scope of an object. ?The ... case has changed from
> undefined to the new notion of conditionally-supported behavior, so I added
> a file to document our implementation choice while I was thinking about it.
>
> We still retain the old notion of POD for use in class layout, as that is
> part of the ABI. ?I renamed the macro so it's clear that it's only being
> used for that purpose. ?__is_pod now gives the new definition.
>
> libstdc++ folks: I'd think that the type_traits stuff should live in
> libsupc++ with the other compiler-interface bits; what do you think?
>
> Tested x86_64-pc-linux-gnu, applied to trunk.
>
>
This caused:
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43333
--
H.J.