Subject: Re: C Language Standard(s)
To: None <current-users@NetBSD.ORG>
From: der Mouse <mouse@Collatz.McRCIM.McGill.EDU>
List: current-users
Date: 12/19/1995 06:20:54
> Is there any "official" decision about the use of ISO/ANSI standard C
> in NetBSD?

For the most part, we're already using it.  Most of the code is
conforming, very little is strictly conforming...and it's really not
possible to do it otherwise.  Strict conformance is crippling enough
that it's almost impossible to write to and even harder to get anything
done.  (I've tried. :-)

Remember, old-style code _is_ ANSI C.

> One thing that we could start doing is to move multiple external
> declarations of the same functions and variables from the .c source
> files using them to header files, to guarantee that the same
> declaration is used everywhere.

This is a worthwhile suggestion, but it is orthogonal to writing to
either conformance or strict conformance with ANSI C.  It is just as
conforming to declare external functions where they're used as it is to
declare them in a single header file - provided all the declarations
agree, of course.

> When doing this I recommend using real prototypes instead of K&R
> function declarations.

Prototypes are also worthwhile.  Personally, I do my best to build
everything with -Werror -W -Wall -Wpointer-arith -Wcast-qual
-Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes.  (This breaks
some of the NetBSD header files; I maintain a shadow tree of include
files...and may start generating PRs as well.)

					der Mouse

			    mouse@collatz.mcrcim.mcgill.edu