Re: [Ctool-develop] testing the gcc test suite
Brought to you by:
flisakow
From: Stefan S. <se...@sy...> - 2003-09-03 23:28:54
|
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 |