------- Comment #5 from pinskia at gcc dot gnu dot org 2006-09-12 08:01 ------- class A { public: int a[0]; };
This class is not empty, it contains a (GNU) variable sized array so the size of zero is correct for this extension. The reason why it is zero is because the array size is zero, this allows for the correct caculation when doing sizeof(A)+sizeof(int)*n for malloc and/or new. -- pinskia at gcc dot gnu dot org changed: What |Removed |Added ---------------------------------------------------------------------------- Status|WAITING |RESOLVED Resolution| |INVALID http://gcc.gnu.org/bugzilla/show_bug.cgi?id=28820