Broken C array autosizing breaks glibc compile

Geoff Keating geoffk@cygnus.com
Fri Sep 22 08:38:00 GMT 2000


> 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>


More information about the Gcc-bugs mailing list