Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!uunet!mcsun!hp4nl!charon!dik From: dik@cwi.nl (Dik T. Winter) Newsgroups: comp.sys.sgi Subject: Re: Where's the SPARK in my SPARC???? Message-ID: <3011@charon.cwi.nl> Date: 23 Feb 91 13:07:55 GMT References: <1991Feb21.120049.5626@jarvis.csri.toronto.edu> <3001@charon.cwi.nl> <1991Feb22.183550.16477@jarvis.csri.toronto.edu> Sender: news@cwi.nl Organization: CWI, Amsterdam Lines: 22 In article <1991Feb22.183550.16477@jarvis.csri.toronto.edu> drb@eecg.toronto.edu (David R. Blythe) writes: > In article <3001@charon.cwi.nl> dik@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@cwi.nl Brought to you by Super Global Mega Corp .com