Article View: comp.std.c
Article #2391Re: ANSI prototypes, the right choice...
From: Steve Summit
Date: Sat, 09 Feb 1991 07:52
Date: Sat, 09 Feb 1991 07:52
35 lines
2326 bytes
2326 bytes
In article <7708@sugar.hackercorp.com> peter@sugar.hackercorp.com (Peter da Silva) writes:
[mixture of new-style prototype declaration and old-style definition]
>While some compilers will accept this declaration while this prototype is
>in scope, it is not portable and should at least generate a warning.
In article <15089@smoke.brl.mil> gwyn@smoke.brl.mil (Doug Gwyn) writes:
>No, this is perfectly okay. If Lattice C has a problem with it, it is a
>bug in Lattice C.
Not necessarily a bug, although I'd probably be annoyed by it.
Old-style declarations and definitions are both officially
obsolescent (sections 3.9.4 and 3.9.5); subject to deletion, at
X3J11's whim, in a future version of the Standard. As the
Rationale says,
Characterizing the old style as obsolescent is meant to
discourage its use, and serve as a strong endorsement by
the Committee of the new style. It confidently expects
that approval and adoption of the prototype style will
make it feasible for some future C Standard to remove the
old syntax.
K&R2 additionally asserts (p. 202) that "Mixtures are to be
avoided if possible." Since compilers may issue any warning
messages they want to, I suspect that Lattice is just trying to
prod people towards the Party line.
(I'm actually not trying to defend the deprecation of the old
style; in fact I prefer that style. Prototypes don't do anything
for me that lint doesn't do, and they're a pain to use during
transition. But it's clear they're here to stay, so you don't
need to chastise me for being hidebound.)
Steve Summit
scs@adam.mit.edu
Technical Details
Message-ID:
<1991Feb9.075215.26939@athena.mit.edu>Path:
arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!bonnie.concordia.ca!ccu.umanitoba.ca!herald.usask.ca!alberta!ubc-cs!van-bc!zaphod.mps.ohio-state.edu!think.com!snorkelwacker.mit.edu!bloom-picayune.mit.edu!newsReferences:
<7708@sugar.hackercorp.com> <15089@smoke.brl.mil>Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!bonnie.concordia.ca!ccu.umanitoba.ca!herald.usask.ca!alberta!ubc-cs!van-bc!zaphod.mps.ohio-state.edu!think.com!snorkelwacker.mit.edu!bloom-picayune.mit.edu!news From: scs@adam.mit.edu (Steve Summit) Newsgroups: comp.std.c,comp.sys.amiga.programmer Subject: Re: ANSI prototypes, the right choice... Message-ID: <1991Feb9.075215.26939@athena.mit.edu> Date: 9 Feb 91 07:52:15 GMT References: <7708@sugar.hackercorp.com> <15089@smoke.brl.mil> Sender: news@athena.mit.edu (News system) Reply-To: scs@adam.mit.edu Organization: Thermal Technologies, Inc. Lines: 35