This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] Classify non-POD struct types more or less correctly on AMD64
- From: Gabriel Dos Reis <gdr at integrable-solutions dot net>
- To: Mark Kettenis <kettenis at chello dot nl>
- Cc: drow at mvista dot com, jh at suse dot cz, aj at suse dot de, mark at codesourcery dot com, gdb-patches at sources dot redhat dot com, gcc at gcc dot gnu dot org
- Date: 11 Jan 2004 15:59:08 +0100
- Subject: Re: [PATCH] Classify non-POD struct types more or less correctly on AMD64
- Organization: Integrable Solutions
- References: <200401101800.i0AI0Zm6026623@elgar.kettenis.dyndns.org><20040110183622.GA8108@nevyn.them.org><200401101858.i0AIwdhk032901@elgar.kettenis.dyndns.org><20040111041009.GA15714@nevyn.them.org><200401111237.i0BCbVPL010349@elgar.kettenis.dyndns.org>
Mark Kettenis <kettenis@chello.nl> writes:
| The 1996 ANSI C++ draft has the following statement about non-POD-ness:
using an old oudated document may lead to confusion (luckily, that is
not the case here).
| "A POD-struct is an aggregate class that has no non-static data members
^^^^^^^^^^^^^^^
| of type pointer to member, non-POD-struct, non-POD- union (or array of
| such types) or reference, and has no user-defined copy assignment
| operator and no user-defined destructor. Similarly, a POD-union is an
| aggregate union that has no non-static data members of type pointer to
| member, non-POD-struct, non-POD-union (or array of such types) or
| reference, and has no user-defined copy assignment operator and no
| user-defined destructor. A POD class is a class that is either a
| POD-struct or a POD-union."
|
| So it doesn't say anything about baseclasses.
Sure it does. A POD-struct ought to be an aggregate class, and an
aggregate class does not have base classes.
-- Gaby