Parameter Types in Old-Style Function Definitions

Doug Gwyn gwyn at smoke.BRL.MIL
Thu Sep 6 01:44:13 AEST 1990


In article <10391 at pt.cs.cmu.edu> hjelm at g.gp.cs.cmu.edu (Mark Hjelm) writes:
-What is the compiler allowed/required to do for this:
-    f(a, b)
-        float a;
-        char b;
-    {
-    }
-Is the type of "a" (as seen inside of "f") float or double or either?
-Is the type of "b" char or int or either? 

Assuming the absence of any prototype for this function, its actual
arguments would be passed as double and int, which upon entry to the
function would be in effect assigned to local variables a and b
having types float and char, respectively.



More information about the Comp.std.c mailing list