This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug c++/28820] sizeof == 0 for empty class



------- 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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]