This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/28820] sizeof == 0 for empty class
- From: "pluto at agmk dot net" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 23 Aug 2006 15:59:51 -0000
- Subject: [Bug c++/28820] sizeof == 0 for empty class
- References: <bug-28820-13137@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #3 from pluto at agmk dot net 2006-08-23 15:59 -------
(In reply to comment #1)
> (In reply to comment #0)
> > int size1 = sizeof(A); // == 0, should be nonzero
> > int size2 = sizeof(a); // == 0, should be nonzero
>
> What makes you think so?
>
> > Since: ISO 14882-2003, 9 [Classes].3
>
> I don't quite know which section you refer to. Can you elaborate?
$9.3: "Complete objects and member subobjects of class type
shall have nonzero size. (...)"
--
pluto at agmk dot net changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |pluto at agmk dot net
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=28820