Re: [Ctool-develop] testing the gcc test suite
Brought to you by:
flisakow
From: Shaun F. <fli...@so...> - 2003-09-04 16:27:11
|
If this is legal C99 we should just support it directly. Please remove the warning. Thanks, Shaun On Wednesday, September 3, 2003, at 04:26 PM, Stefan Seefeld wrote: > Shaun Flisakowski wrote: > >> Empty arrays are not allowed in Ansi C in general, it does seem like >> that should probably be a warning rather than an error though, since >> K&R C was lax about that. > > I found this in <cdefs.h> on my machine: > > /* Support for flexible arrays. */ > #if __GNUC_PREREQ (2,97) > /* GCC 2.97 supports C99 flexible array members. */ > # define __flexarr [] > #else > # ifdef __GNUC__ > # define __flexarr [0] > # else > # if defined __STDC_VERSION__ && __STDC_VERSION__ >= 199901L > # define __flexarr [] > # else > /* Some other non-C99 compiler. Approximate with [1]. */ > # define __flexarr [1] > # endif > # endif > #endif > > and the line the ctdemo is stumbling over is: > > __extension__ struct __gconv_step_data __data __flexarr; > > I think the 'right thing to do' would be to provide some > form of a config file that sets individual parser behaviors > such as whether or not to accept 'flexible arrays'. > > A quick fix would be to just take the error condition > out of gram.y. This flexible array thing seems to occure > in almost every file I parse as it's part of some very > fundamental system headers on my machine. > > Regards, > Stefan > > > > ------------------------------------------------------- > This sf.net email is sponsored by:ThinkGeek > Welcome to geek heaven. > http://thinkgeek.com/sf > _______________________________________________ > Ctool-develop mailing list > Cto...@li... > https://lists.sourceforge.net/lists/listinfo/ctool-develop > |