On Mon, Mar 04, 2002 at 09:35:29AM -0700, M. Warner Losh wrote:
> In message: <[EMAIL PROTECTED]>
>             Erik Trulsson <[EMAIL PROTECTED]> writes:
> : I think it is still there (and my draft copy says the same thing).  
> : I was thinking about the original C89 standard which does not allow it
> : (and does not allow incomplete array types in structs). Guess I should
> : have said which standard I was referring to.
> 
> struct foo {
>        char array[0];
> };
> 
> appears to be in C-99 but not C-89.  If you have the draft, so far the
> only thing I've noticed that is different between the draft and the
> final standard is that there's 10-15 more footnotes in the final
> standard than were in the final draft.
> 
> Warner

Are you sure that is in C99?
What is allowed in C99 (but wasn't in C89) is

struct foo
    {
    int b;
    char array[];
    };

Note that you must have a 'normal' field before the incomplete array.

I don't think
   char array[0];
is allowed in either of C89 or C99.



-- 
<Insert your favourite quote here.>
Erik Trulsson
[EMAIL PROTECTED]


To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-hackers" in the body of the message

Reply via email to