Prototypes with old style definitions
Walter Bright
bright at Data-IO.COM
Tue Feb 13 07:48:41 AEST 1990
In article <626 at cameron.cs.duke.edu> amr at dukee.egr.duke.edu (Anthony M. Richardson) writes:
< float foo(float, int);
<
< float foo(x, n)
< float x;
< int n;
< { ......... }
<what does the standard say about parameter conversions in this case?
"Syntax error!" But seriously, the second definition is equivalent to:
float foo(tmp,n)
double tmp;
int n;
{ float x = tmp;
....
}
Thus the syntax error. This and similar examples bite lots of code that
is being converted to ANSI prototypes.
More information about the Comp.lang.c
mailing list