This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: Zero-length arrays


    I would much prefer that this test be done in the front end
    where we can give a hard error, and give decent context.

I suppose, but the issue is that a zero-length field is ambiguous.  It could
actually *be* zero length or it could be extendable.  This way, the ambiguity
is only if it's in the last field.  Otherwise, it's treated as zero-length
and not extendable.

The other approach (which is probably cleaner but more work) adds a flag that
a front end can set to say this is an extendable field.  Then we just test
that flag instead of looking for the type or a zero size.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]