Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!iuvax!rutgers!cmcl2!adm!smoke!gwyn From: gwyn@smoke.BRL.MIL (Doug Gwyn) Newsgroups: comp.lang.c Subject: Re: Prototyping char parameters in ANSI C Message-ID: <10139@smoke.BRL.MIL> Date: 27 Apr 89 04:23:04 GMT References: <3950014@eecs.nwu.edu> Reply-To: gwyn@brl.arpa (Doug Gwyn) Organization: Ballistic Research Lab (BRL), APG, MD. Lines: 15 In article <3950014@eecs.nwu.edu> gore@eecs.nwu.edu (Jacob Gore) writes: > void f(char); > void f(c) > char c; > { > } >The version of GNU cc I have complains: Once again GCC is correct. The "old style" function definition is of a function that is passed an int (NOT a char) argument when it is called and which subsequently accesses the least-significant char of the int that was passed. The prototype declaration is for a function that is (potentially) passed just a char, not an int. Therefore the argument- passing details are potentially different between the two cases, and it is considered a function declaration/definition mismatch.