Subject: bug#15825: unidata-gen seems messed up somehow

From: Paul Eggert <[email-masked]>
Date: Fri, 08 Nov 2013 00:07:43 -0800

Eli Zaretskii wrote:
> What does 'sizeof' return for a struct that has array[0] at the end?

For something like this:

   struct s { ...; int data[]; };

C99 says sizeof (struct s) == offsetof (struct s, data).
C89 doesn't have this concept, so for portability
we do this in C89:

   struct s { ...; int data[1]; };

and use offsetof (struct s, data) instead of
sizeof (struct s), as the latter's wrong for C89.