CC bug in IRIX 3.3.1 ?

David B.Anderson davea at quasar.wpd.sgi.com
Tue Jan 15 03:19:17 AEST 1991


In article <9101120521.aa04946 at WOLF.BRL.MIL> mike at 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 at sgi.com ]
[``What can go wrong?''                           --Calvin to Hobbes]



More information about the Comp.sys.sgi mailing list