Compiler bug

Guy Harris guy at sun.uucp
Sat May 18 17:52:06 AEST 1985


> > extern int usr1(), usr2(), usr3();
> > 
> > int	usrprocs[] = { usr1, usr2, usr3 }
> > 
> > Would someone be good enough to check this out on a sysV machine?
> 
> My SysV machine (VAX) gives me:
> "bug.c", line 3: warning: illegal combination of pointer and integer, op =
> "bug.c", line 3: warning: illegal combination of pointer and integer, op =
> "bug.c", line 3: warning: illegal combination of pointer and integer, op =
> 
> This is what I would expect. What did BSD do?

The same thing (although my 4.2BSD machine is a Sun, I think it does the
same thing on a VAX; the 4.2BSD VAX compiler is basically the SysIII
compiler).  *Everybody* should expect it.  The above code is simply wrong.
If your compiler doesn't complain, complain to the author(s) of your
compiler.  "Type-correctness is everybody's business."

	Guy Harris



More information about the Comp.unix mailing list