* Re: [hangar18-general] [9fans] function inconsistently declared (fwd)
[not found] <Pine.LNX.4.33.0210011526010.2903-100000@einstein.ssz.com>
@ 2002-10-04 18:52 ` bbourg
0 siblings, 0 replies; only message in thread
From: bbourg @ 2002-10-04 18:52 UTC (permalink / raw)
To: hangar18-general, 9fans
Jim Choate wrote:
>
> ---------- Forwarded message ----------
> Date: Tue, 1 Oct 2002 18:23:26 +0200
> From: Zoltan Jarai <jarai@mail.tvnet.hu>
> Reply-To: 9fans@cse.psu.edu
> To: 9fans@cse.psu.edu
> Subject: [9fans] function inconsistently declared
>
> I suspect this must be elementary but could someone, please, enlighten
> me why the code fragment below produces an error message:
>
> cpu% 8c -FVw c.c
> c.c:4 function inconsistently declared: f
> cpu% cat c.c
> int f(int,char);
> int f(a,b)
> int a;
> char b;
> {
> return a+b;
> }
> cpu%
/* Try: */
int f(int a,char b) /* ANSI */
{
return (a+b);
}
/* Or */
int f(a,b) /* K&R */
int a;
char b;
{
return a+b;
}
/* but not both */
Later, Bob
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2002-10-04 18:52 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
[not found] <Pine.LNX.4.33.0210011526010.2903-100000@einstein.ssz.com>
2002-10-04 18:52 ` [hangar18-general] [9fans] function inconsistently declared (fwd) bbourg
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).