Subject: Re: a new KNF (and some comments)
To: None <tech-misc@netbsd.org, tech-kern@netbsd.org>
From: ITOH Yasufumi <itohy@netbsd.org>
List: tech-misc
Date: 01/21/2000 10:55:18
In article <200001210050.LAA23301@wombat.cs.rmit.edu.au>
lukem@cs.rmit.edu.au writes:
> Here's what I propose:
>
> * Update it to ANSI C (`c89').
If we switch to ANSI style, we cannot ensure the binaries
are linkable by other binaries generated by K&R compiler or
from K&R style code any longer.
For example, a function
f1(short arg)
{
/* ... */
}
will not link correctly with K&R style compiler, while
f2(arg)
short arg;
{
/* ... */
}
will.
We do not require to distribute source code (user may not change
the binaries), and we can not force user to use ANSI style (our
toolchain supports K&R style), it may cause compatibility problems.
The simplest way to avoid this sort of problem is
to use K&R style (with ANSI prototypes --- current style :-),
in my thought.
Opinions?
--
ITOH, Yasufumi <itohy@netbsd.org>