Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!tut.cis.ohio-state.edu!ucbvax!decwrl!decvax!ima!haddock!karl From: karl@haddock.ima.isc.com (Karl Heuer) Newsgroups: comp.lang.c Subject: Re: Prototyping char parameters in ANSI C Message-ID: <12842@haddock.ima.isc.com> Date: 28 Apr 89 03:55:21 GMT References: <3950014@eecs.nwu.edu> <8661@xanth.cs.odu.edu> Reply-To: karl@haddock.ima.isc.com (Karl Heuer) Organization: Interactive Systems, Boston Lines: 15 In article <8661@xanth.cs.odu.edu> kremer@cs.odu.edu (Lloyd Kremer) writes: >In article <3950014@eecs.nwu.edu> gore@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@haddock.isc.com), The Walking Lint