[Bug c++/60336] empty struct value is passed differently in C and C++

pinskia at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Mon Nov 16 06:39:00 GMT 2015


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

--- Comment #37 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
(In reply to H.J. Lu from comment #35)
> (In reply to Andrew Pinski from comment #34)
> > 
> > So no FIELD_DECL as part of fields; only var or type or method_decl?
> 
> struct dummy { };
> struct true_type { struct dummy i; };

This is two empty structs.  The same is true even in GNU C.  So a struct which
contains no field decls or field decls which is an empty struct is also an
empty struct.


More information about the Gcc-bugs mailing list