Subject: Re: c99 in KNF?
To: None <tech-kern@netbsd.org>
From: Matthew Mondor <mm_lists@pulsar-zone.net>
List: tech-kern
Date: 01/11/2006 22:41:43
On Wed, 11 Jan 2006 12:27:24 -0500
Chapman Flack <nblists@anastigmatix.net> wrote:

> I notice on the port-features page that all ports seem to be
> running gcc 3.3.3.  So ... are some c99 features ok to use in
> KNF, like designators in initializers or aggregate assignment,
> or declarations in loops? Are there some c99 features that are
> definitely objectionable in KNF?

Many stick to strict C89 code when they want maximum portability, but
indeed we already use a number of GNU extensions already, and C99 might
become as portable when most systems have C99 compliant compilers as you
said...  We had to break C89 anyway to support 64-bit types on 32-bit
native architectures.

Are C99 types already favored over u_int32_t etc now in the NetBSD tree?

I'm curious, if C99 was generally accepted for kernel code, would we
still advocate variable definitions at the start of blocks, etc, simply
for clean code style conventions?  The KNF style guide would surely need
to be revised to specify what is allowed and whatnot in any case...

Matt

-- 
Note: Please only reply on the list, other mail is blocked by default.
Private messages from your address can be allowed by first asking.