This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


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

Re: Latest gencodes.c is not ISO C compatible


On Jan  4, 2001, "Kaveh R. Ghazi" <ghazi@caip.rutgers.edu> wrote:

> Alexandre,

Hi, Kaveh!

> When I bootstrap the latest CVS on irix6.2 or solaris2.7 using cc for
> stage1 I get an error compiling gencodes.c.

Oops.

> gcc also complains:

>> gencodes.c: In function `output_predicate_decls':
>> gencodes.c:62: warning: ANSI C forbids empty initializer braces

> I believe you introduced this construct.

Yep.  Sorry, I hadn't noticed the warning :-(

> If this patch works for you I'll install it as an "obvious" fix.

I'd rather remove the NULL entry entirely, but I realize
PREDICATE_CODES is supposed to end with a comma, and I'm not sure a
trailing comma is acceptable in an array initializers (or if there are
compilers that would choke on it even if it's acceptable).  Does
anybody know for sure?

Meanwhile, please check your patch in:

> 	* gencodes.c (output_predicate_decls): Fill empty initializer
> 	braces.

Apologies for the new failure :-(

-- 
Alexandre Oliva   Enjoy Guarana', see http://www.ic.unicamp.br/~oliva/
Red Hat GCC Developer                  aoliva@{cygnus.com, redhat.com}
CS PhD student at IC-Unicamp        oliva@{lsd.ic.unicamp.br, gnu.org}
Free Software Evangelist    *Please* write to mailing lists, not to me

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