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

--- Comment #5 from Martin Uecker <uecker at eecs dot berkeley.edu> ---
(In reply to Jakub Jelinek from comment #4)
> If you want aggregate with size 1 and isn't used to store information, use
> typedef struct { char : 1; } zero;
> instead.

Yes, thank you.

But for my understanding: Is there a reason why it is important that zero-sized
objects should sometimes have the same address? I am wondering because I think
zero-sized arrays would make sense to allow in C (it sometimes makes
programming edge cases simpler in numerical code) and at the same time I think
it might be a nice principle to require that all unique objects existing at the
same time should also have a unique address.

Reply via email to