gcc bug (possibly)
RAMontante
bobmon at iuvax.cs.indiana.edu
Sat Mar 4 08:06:54 AEST 1989
budd at mist.cs.orst.edu (Tim Budd) <9201 at 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 at cs.indiana.edu)
condemned to write glowingly of it in | Computer Science Department
slick, short-lived magazines. | Indiana University, Bloomington IN
More information about the Comp.lang.c
mailing list