https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64021

Jakub Jelinek <jakub at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |jakub at gcc dot gnu.org

--- Comment #5 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Isn't that just because in C++ empty structs are forced by the FE into having
length of one byte?  I mean, if you:
struct S {};
int a = sizeof (struct S);
struct S b;
then in C it is int a = 0; and b is a common with zero size, while in C++ it is
int a = 1; and b has size 1.  So it is natural that those two (which are very
much different thing) are passed differently, I don't see anything to change on
that.  So, for go, the question is if it follows GNU C or C++ for empty
structs.

Reply via email to