Subject: Re: C Language Standard(s)
To: None <current-users@NetBSD.ORG>
From: Bakul Shah <bakul@netcom.com>
List: current-users
Date: 12/19/1995 22:09:40
John Kohl writes:
> However, completely new code written with ANSI C function definitions is
> getting converted to old-style on the way into the source tree.  I find
> this disgusting: it's been 6 years since the ANSI C standard was
> approved, and yet we're still afraid of using reasonable C constructs?

> [I would guess that there are also probably places where useful standard
> C syntax or features would simplify code or eliminate ugly #ifdef's.]

I agree with John completely on this issue.

One argument people have put forward to continue using old
style declarations is that they make it easier to port
NetBSD to a machine that does not have an ANSI C compiler.
Are people actually contemplating ports to such machines?
If not, it is high time to switch to pure ANSI.  Even if
they are, it is almost a given that gcc has to work on such
a machine first and once you get gcc up the rest can be ANSI
C.  If no port exists, lcc is relatively easy to port to a
new architecture.  Finally, tools like cproto make it
relatively painless to convert K&R to ANSI or in the other
direction so you can do what is most expedient for a new
port.  I just don't see the need for the __P() kind of
visual clutter in ``production'' sources.

Some people also argue that the ANSI style prototypes don't
work any better than the old style declarations (especially
if you use lint).  My counter argument is that this battle
was fought and lost during the ANSIfication of C and we have
to move with the time and stick with the standard (in the
spirit in which it was intended).  The old style
declarations were/are allowed in ANSI C to ease the
transition process and may become obsolescent at some point.
Claiming they are ANSI compatible misses one major point of
ANSI C.