Hi,
>> That would definitely be a good move. Maybe someone should approve it?
>
> Yes, but I agree that we ought to restrict it to trailing zero-sized arrays.
> That would help to allay Jakub's concerns about possible ABI fallouts.
>
> --
> Eric Botcazou
Other uses of zero-sized arrays in structures and unions are
at least questionable, and should be rejected.
While this construct produces an error:
struct s
{
int a[];
float b;
};
error: flexible array member not at end of struct
This does not even produce a waning:
struct s
{
int a[0];
float b;
};
Would you agree that this "error: flexible array member"
should also be emitted for a zero-sized array member,
maybe as "error: zero-sized array member not at end of struct"?
Regards
Bernd.