This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/25927] Spurious offsetof warnings with private members
- From: "rcbilson at plg dot uwaterloo dot ca" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 23 Jan 2006 18:28:15 -0000
- Subject: [Bug c++/25927] Spurious offsetof warnings with private members
- References: <bug-25927-6420@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #2 from rcbilson at plg dot uwaterloo dot ca 2006-01-23 18:28 -------
(In reply to comment #1)
> Hmm, is this a non POD?
Quoth the standard (9p4):
"A POD-struct is an aggregate class that has no nonstatic 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, the class xxx seems to be POD. It has two data members, both having
pointer-to-object type, and no member functions. The fact that it uses member
access control is, in my reading, insufficient to disqualify it as POD.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=25927