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: "bangerth at dealii dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 7 Jul 2008 23:36:25 -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 #5 from bangerth at dealii dot org 2008-07-07 23:36 -------
Zero-sized arrays are a GNU extension to the C++ standard. Since
the compiler can't know the size of the object, sizeof returns zero.
This behavior is documented in the "Extensions" part of the GCC manual,
in the "Arrays of Length Zero" section.
W.
--
bangerth at dealii dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |bangerth at dealii dot org
Status|NEW |RESOLVED
Resolution| |INVALID
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36749