https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92287
--- Comment #8 from Segher Boessenkool <segher at gcc dot gnu.org> --- (In reply to gnzlbg from comment #7) > > Note that the situation for zero-sized structs isn't very clear in > > most ABIs, these included. > > This is incorrect: zero-sized types are well-defined and efficient on most > ABIs (most ABIs have a rule for small sizes, and these rules cover > zero-sized types). I don't agree that is true. Besides, that is not what I said: a lot of documentation is less than clear on behaviour here (certainly not for older systems, where you *cannot* have zero-sized arguments in any case!) So your de-facto ABI becomes what some popular implementation does. And if you are unlucky you end up with two or more conflicting implementations. > AFAICT, these two (MSP430 and PPC32) are some of the very > few ABIs in which zero-sized types waste one register and one instruction > for no reason. sparc is another, for example. And or1k, too.