Float Double Parameters

Michael Meissner meissner at dg_rtp.UUCP
Tue Apr 1 00:17:02 AEST 1986


In article <2600042 at ccvaxa> aglew at ccvaxa.UUCP writes:
>
>Mouse Parker found a bug in Sun C's treatment of float parameters. 
>His entire letter is reproduced below, since it was from another newsgroup.
>
>>     First and  foremost, get rid of the stupid promotion to doubles!  I
>>have  considered  this  a  misfeature  ever   since  I   heard   of  it.
>>Tangentially  to this  topic,  does X3J11 have anything to  say on  this
>>matter?
>
>X3J11 says "arguments that have type float are promoted to double". Too bad.

Close, but no cigar.  It is true that in the abscence of prototype information,
a compiler conforming to X3J11 has to convert float to double on calls (but
is allowed to use single precision in expressions).  However, if you have a
prototype in scope, the compiler is not obligated to convert to double
precision.

	Michael Meissner, Data General



More information about the Comp.lang.c mailing list