Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!swrinde!mips!sgi!davea@quasar.wpd.sgi.com From: davea@quasar.wpd.sgi.com (David B.Anderson) Newsgroups: comp.sys.sgi Subject: Re: CC bug in IRIX 3.3.1 ? Message-ID: <81043@sgi.sgi.com> Date: 14 Jan 91 16:19:17 GMT References: <9101120521.aa04946@WOLF.BRL.MIL> Sender: guest@sgi.sgi.com Reply-To: davea@quasar.UUCP (David B.Anderson) Organization: Silicon Graphics, Inc., Mountain View, CA Lines: 31 In article <9101120521.aa04946@WOLF.BRL.MIL> mike@BRL.MIL (Mike Muuss) writes: >The following C program generates this error message on an SGI >4D/280 running IRIX 3.3.1: > >80 wolf> cc -c goo.c >ccom: Error: goo.c, line 20: redeclaration of formal parameter, stp > int (*ft_shot)(struct soltab *stp); > ---------------------------------------^ >/* This way does not work */ >struct rt_functab { > int (*ft_prep)(struct soltab *stp); > int (*ft_shot)(struct soltab *stp); >}; This is a compiler botch fixed in ANSI C (released Jan 8) and in the 4.0 release of Traditional C. As Mike discovered, the workaround is to leave off the prototype argument names: struct rt_functab { int (*ft_prep)(struct soltab *); int (*ft_shot)(struct soltab *); }; Bug reports like this are of great value! Thanks for taking the time to make a small and complete example. [ David B. Anderson Silicon Graphics (415)335-1548 davea@sgi.com ] [``What can go wrong?'' --Calvin to Hobbes]