On Feb 10, 2009, at 2:47 PM, Daniel Dunbar wrote:

> Agh! Do we really need to accept this!?
>
> What does f0 compute:
> --
> struct S0 {
>  int a;
>  int b[];
> };
>
> struct S1 {
>  struct S0 x;
>  struct S0 y;
> };
>
> int f0(struct S1 a) {
>  return a.y.b[0];
> }
> --
>
> I haven't studied this issue closely, but this seems to be a GNU
> extension which defies having any reasonable semantics.

It's also a GNU extension that seems to be used within FreeBSD.

We could upgrade this to a more strongly-worded EXTWARN, that says  
something to the effect of: the flexible array member can never safely  
have non-zero length. But, I don't think we can make this a hard  
error :(

        - Doug
_______________________________________________
cfe-commits mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits

Reply via email to