https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92287
--- Comment #3 from Jozef Lawrynowicz <jozefl.gcc at gmail dot com> --- (In reply to gnzlbg from comment #2) > > I can only speak for msp430, but there's no problem with that generated > > assembly. Structures and unions are always passed by reference. > > I suppose that by this you mean that the current behavior is "by design", is > that correct ? > > If so, could you explain the rationale of this design or point me to the ABI > specification document or rationale for it ? I was just considering from an MSP430 point of view, that if the struct can have an address (it looks like it can, even though it has zero size), then that assembly is correct. I'm afraid I don't have any specific insight into how GCC generically handles zero sized structs beyond that though. The MSP430 ABI is here: http://www.ti.com/lit/an/slaa534/slaa534.pdf Although confusingly that document is wrong regarding passing structures and unions by reference. As I mentioned before, structures and unions are always passed by reference, regardless of size.