Subject: Re: use of C99 revisited
To: Garrett D'Amore <garrett_damore@tadpole.com>
From: Garrett D'Amore <garrett_damore@tadpole.com>
List: tech-kern
Date: 04/26/2006 22:19:44
Allen Briggs wrote:
> On Sun, Apr 23, 2006 at 05:36:05PM -0700, Garrett D'Amore wrote:
> [ C99 initializers ]
>   
>> Okay, so not safe in the host tools, but in native only stuff its okay?
>>     
>
> In general, host tools must be as portable as possible and therefore
> we do want to stay away from C99 features.  For native code, C99
> features supported by the in-tree compilers (incl. 2.95 at the
> moment) are OK.
>
> As with any feature, my personal preference is to use it only where
> necessary.  Sometimes it's tempting to overuse features just because
> you can...
>   

There are a few cases where C99 constructs improve readability and
reduce the chance of mistakes.  Named structure and array initializers
are one such case.  Variadic macros (think DPRINTF()) would be nicer
too, I suppose, but probably don't offer much other than eliminating a
superfluous set of parens.)

    -- Garrett

-- 
Garrett D'Amore, Principal Software Engineer
Tadpole Computer / Computing Technologies Division,
General Dynamics C4 Systems
http://www.tadpolecomputer.com/
Phone: 951 325-2134  Fax: 951 325-2191