[cfe-dev] gcc quirk not implemented
Roman Divacky
rdivacky at freebsd.org
Tue Oct 21 06:36:59 PDT 2008
hi
gcc accepts this code:
int
__xuname(int namesize, void *namebuf)
{
struct xutsname {
char sysname[namesize]; /* Name of this OS. */
} *name;
}
which clang refuses with:
const.c:5:25: error: arrays with static storage duration must have constant integer length
char sysname[namesize]; /* Name of this OS. */
^~~~~~~
note that this violates C99 but obviously it's used (for example in freebsd libc code)
so I believe it should get implemented.
roman
More information about the cfe-dev
mailing list