Subject: Re: C Language Standard(s)
To: None <current-users@NetBSD.ORG>
From: Simon J. Gerraty <email@example.com>
Date: 01/10/1996 07:57:36
> The __P has the definite down side that it looks ugly,
But less ugly than
int foo(short x)
int foo(x) short x;
> and that in some
> cases a compiler not-gcc may complain if the K&R style definition means
> a different thing than the prototype;
That just means that the prototype is wrong.
> int foo(short);
> int foo(x)
> short x;
> is not happy for some compilers.
Any compiler that is happy with it is incorrect. And yes I know of a
few DOS compilers that accept that (or at least used to some years ago
Any decent prototype generator would have given
int foo (int);
int foo __P((int));
as the prototype.
If folk want to argue in favour of new-style function defintions then
rather than talking of unproto or whatever, think of porting gcc as
the first step in porting NetBSD. That way you don't have to frob the
code for the initial compile...