This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/36749] sizeof returns 0 for class
- From: "limanski at narod dot ru" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 7 Jul 2008 14:29:38 -0000
- Subject: [Bug c++/36749] sizeof returns 0 for class
- References: <bug-36749-16428@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #3 from limanski at narod dot ru 2008-07-07 14:29 -------
(In reply to comment #2)
> The problem is one of diagnostic: the code should be just rejected because Foo
> is an incomplete type.
>
But the instanse of Foo can be created and both sizeof(Foo) and sizeof(foo) are
equals to zero. Do you mean that this behavior is correct?
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36749