Where's the SPARK in my SPARC????

Dik T. Winter dik at cwi.nl
Sun Feb 24 00:07:55 AEST 1991


In article <1991Feb22.183550.16477 at jarvis.csri.toronto.edu> drb at eecg.toronto.edu (David R. Blythe) writes:
 > In article <3001 at charon.cwi.nl> dik at cwi.nl (Dik T. Winter) writes:
 > >The major problem is that the -fsingle flag is nearly useless for original
 > >K&R C.  Suppose you have a routine whose declaration reads:
 > >	void rout(s) float s; { ... }
 > >this is effectively the same as declaring:
 > >	void rout(s) double s; { ... }
 > >and within the routine all calculations involving s are effectively done
 > >in double rather than float *regardless to whether the -fsingle flag was
 > >used or not*.
 > This is also true for the SGI compiler so its not likely the PI got any big
 > performance advantage from that.
But this is not true if you are using prototypes (which the original poster
did).  BTW I just found a bug in the compiler; the sequence:
	void foo(float f);
	void foo(double f) { return; }
is accepted by the compiler (as it is if float and double are interchanged).
Also all other combinations of old style K&R specification with ANSI
declaration are allowed.  This will lead to incorrect results.
--
dik t. winter, cwi, amsterdam, nederland
dik at cwi.nl



More information about the Comp.sys.sgi mailing list