Date: Sat, 02 Feb 2002 15:39:41 -0700 (MST) From: "M. Warner Losh" <imp@village.org> To: bde@zeta.org.au Cc: drosih@rpi.edu, deatley@apple.com, arch@FreeBSD.ORG Subject: Re: __P macro question Message-ID: <20020202.153941.85552167.imp@village.org> In-Reply-To: <20020131231008.P4085-100000@gamplex.bde.org> References: <20020130.145424.00452635.imp@village.org> <20020131231008.P4085-100000@gamplex.bde.org>
next in thread | previous in thread | raw e-mail | index | archive | help
In message: <20020131231008.P4085-100000@gamplex.bde.org>
Bruce Evans <bde@zeta.org.au> writes:
: On Wed, 30 Jan 2002, M. Warner Losh wrote:
:
: > I'm going through bin right now removing __P() and making the
: > functions have new-style rather than old-style decls. It is a nice
: > little mindless thing to do when to relax and unwind. I plan on
: > committing this this weekend (see below). I've seen nothing so far to
: > tell me not to do it:
:
: Don't do it all. Some people prefer old-style decls, and unlike __P(()),
: they don't involve any preprocessor hackery; they are part of ISO C.
From The last draft of the latest C standard:
Introduction
[#2] Certain features are obsolescent, which means that they
may be considered for withdrawal in future revisions of this
International Standard. They are retained because of their
widespread use, but their use in new implementations (for
implementation features) or new programs (for language
[6.11] or library features [7.26]) is discouraged.
6.11.4 Function definitions
[#1] The use of function definitions with separate parameter
identifier and declaration lists (not prototype-format
parameter type and identifier declarators) is an obsolescent
feature.
I'm going to the trouble of doing it now because we'll have to do it
eventually. It is sufficiently painful that I may stop doing it for
the larger src.bin, src.sbin directories.
At some point we're going to have to do this, why not now. I know
that standard is a bit vague about the timeframe, but I suspect that
if we eliminate them from our code base, that will be one less dusty
deck to be used as justification for keeping the feature. Now is a
good time for me because I have a lot of stress in my life and doing
cleaning like this helps me relax. :-)
: - be sure to unsort the prototypes and add excessive indentation to them.
: Using a low quality script to regenerate all the prototypes is a good
: way to do this.
Sure. I'll see what I can do :-) I can also indent them in odd ways,
use reserved words for the parameter names and try to omit types when
they are ints. :-)
Warner
To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-arch" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20020202.153941.85552167.imp>
