scope of actual parameters

D'Arcy Cain darcy at bbm.UUCP
Wed Aug 9 04:48:13 AEST 1989


In article <8936 at june.cs.washington.edu>, pardo at june.cs.washington.edu (David Keppel) writes:
> My *impression* is that actual parameter names are local to the
> function.  My dpANS-compliant compiler (gcc version 1.34) complains on
> the following program:
> 
>     typedef int foo;
>     m (foo){}
> 
>     foo.c: parameter name omitted
> 
> 
typedef creates a new data type not a parameeter name so the above response
is correct.  the declaration is exactly the same as the following:

	m (int){}

Which is obviously incorrect.

D'Arcy J.M. Cain



More information about the Comp.std.c mailing list