Path: utzoo!attcan!utgpu!jarvis.csri.toronto.edu!mailrus!tut.cis.ohio-state.edu!rutgers!bellcore!faline!thumper!ulysses!andante!alice!ark From: ark@alice.UUCP (Andrew Koenig) Newsgroups: comp.lang.c Subject: Re: Prototyping char parameters in ANSI C Message-ID: <9250@alice.UUCP> Date: 27 Apr 89 14:30:03 GMT References: <3950014@eecs.nwu.edu> Organization: AT&T Bell Laboratories, Liberty Corner NJ Lines: 35 In article <3950014@eecs.nwu.edu>, gore@eecs.nwu.edu (Jacob Gore) writes: > Is this valid ANSI C (or dpANS or whatever you want to call it): > > void f(char); > > void f(c) > char c; > { > } No. When you say void f(c) char c; { /* stuff */ } that is essentially equivalent to: void f(int c_temp) { char c = c_temp; { /* stuff */ } } Neither is equivalent to void f(char c) { /* stuff */ } See page 60 of `C Traps and Pitfalls.' -- --Andrew Koenig ark@europa.att.com