This is the mail archive of the libc-alpha@sources.redhat.com mailing list for the glibc project.


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

Re: Broken C array autosizing breaks glibc compile


> From: Franz Sirl <Franz.Sirl-kernel@lauterbach.com>
> Date: Thu, 21 Sep 2000 23:18:46 +0200

> static const struct keyword_t *
> repertoiremap_hash (const char *str, unsigned int len)
> {
>   static const struct keyword_t wordlist[0] =
>   {
>     {"escape_char", 1, 0},
>     {"comment_char", 2, 0},
>     {"CHARIDS", 3, 0},
>     {"END", 4, 0},
>   };

GCC should produce an error, saying that zero-size arrays are not
permitted by ISO C; or it should produce a warning, saying that
zero-size arrays may not be initialized.

-- 
- Geoffrey Keating <geoffk@cygnus.com>

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