Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!iuvax!bobmon From: bobmon@iuvax.cs.indiana.edu (RAMontante) Newsgroups: comp.lang.c Subject: Re: gcc bug (possibly) Message-ID: <18198@iuvax.cs.indiana.edu> Date: 3 Mar 89 22:06:54 GMT Reply-To: bobmon@iuvax.cs.indiana.edu (RAMontante) Organization: malkaryotic Lines: 29 budd@mist.cs.orst.edu (Tim Budd) <9201@orstcs.CS.ORST.EDU> : - -extern int foo ( short ); - -int foo(x) -short x; -{ ; } - -I get a message that the argument doesn't match the prototype. -Works fine if I use int in place of short. Although you've given a prototype for foo(), the function definition doesn't match it -- int foo(x) is an old-style definition. Your error message is complaining (indirectly) that this line is incorrect, as it doesn't match the prototype. Try int foo(short x) { ; } instead. This works for me. I don't think you need the extern keyword either. -- Those who do not understand MSDOS are | Bob Montante (bobmon@cs.indiana.edu) condemned to write glowingly of it in | Computer Science Department slick, short-lived magazines. | Indiana University, Bloomington IN