Prototyping char parameters in ANSI C

Karl Heuer karl at haddock.ima.isc.com
Fri Apr 28 13:55:21 AEST 1989


In article <8661 at xanth.cs.odu.edu> kremer at cs.odu.edu (Lloyd Kremer) writes:
>In article <3950014 at eecs.nwu.edu> gore at eecs.nwu.edu (Jacob Gore) writes:
>>[gcc complains about]
>>	void f(char);
>>	void f(c) char c; {...}

>The responses I have seen all make reference to "old style" automatic widening
>... How do you tell the compiler that you want this *NEW* behavior?  If a
>full prototype isn't good enough, what is?

Specify a prototype on the *definition* as well as the declaration.  Thus:
	extern void f(char);
	void f(char c) {...}

Karl W. Z. Heuer (ima!haddock!karl or karl at haddock.isc.com), The Walking Lint



More information about the Comp.lang.c mailing list