Subject: Re: ansi.h merger
To: None <eeh@netbsd.org>
From: Todd Vierling <tv@wasabisystems.com>
List: tech-ports
Date: 07/28/2001 00:51:34
[tech-ports moved to Bcc:]

On 28 Jul 2001 eeh@netbsd.org wrote:

: Since we're in the process of switching to a new toolchain, this
: would be a good time to merge all the different ports' ansi.h
: files so we can actually make everything lint clean.  Without
: this, trying to clean things for one port will break it for
: others.

I've already noted this in more detail in private email, but for the list
members, the two main factors are:

* Lint is currently **broken** on a toolchain built from the gcc 2.95.x
  sources, because the hacks for LINTCOMMENT that we added have not been
  ported to gcc 2.95.x.  Once that's done, come back and talk to me.  :)

* With the above in mind, any warnings and errors in gcc and/or lint that
  talk about typecasting problems for printf format strings,
  <machine/ansi.h> type conversions, etc. are actually correct:  that is
  broken, nonportable code that must be fixed, because the <machine/ansi.h>
  types do not have fixed correlations to primitive integer types (they are
  platform-defined in C99).

  sommerfeld did a printf() format audit last year, for instance, and adding
  -Wformat=2 in gcc 2.95.x should provide most of this same format checking
  to warn on all platforms when an unportable construct is used.  There are
  some other -W options that may help here, too.

===

This is not a problem.  The correct fix to any of this is to fix the broken
code so it is portable as defined by C99.  There's dozens of methods that
are explicitly listed there to assist in such fixing.

-- 
-- Todd Vierling <tv@wasabisystems.com>  *  Wasabi NetBSD:  Run with it.
-- NetBSD 1.5 now available on CD-ROM  --  http://www.wasabisystems.com/