https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84046
--- Comment #6 from Jakub Jelinek ---
Zero sized object occupies zero bytes, if you have an array of them,
necessarily all the elements of the array need to have the same address. While
individual variables could be in theory padded, it would
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84046
--- Comment #5 from Martin Uecker ---
(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
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84046
--- Comment #4 from Jakub Jelinek ---
If you want aggregate with size 1 and isn't used to store information, use
typedef struct { char : 1; } zero;
instead.
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84046
--- Comment #3 from Martin Uecker ---
(In reply to Richard Biener from comment #1)
> Confirmed. I think the C language doesn't specify this since zero-sized
> arrays are a GNU extension and thus in C no zero-sized types/decls exist?
>
> So
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84046
Jakub Jelinek changed:
What|Removed |Added
Status|WAITING |RESOLVED
CC|
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84046
Richard Biener changed:
What|Removed |Added
Status|UNCONFIRMED |WAITING
Known to work|