Article View: comp.std.c
Article #4060Re: Identifiers in definitions
From: Tanmoy Bhattacharya
Date: Wed, 20 Sep 1995 14:44
Date: Wed, 20 Sep 1995 14:44
42 lines
1828 bytes
1828 bytes
In article <awiner-1909952245190001@awiner-mac2.us.oracle.com>,
awiner@oracle.com (Adam Winer) writes:
|> Are identifiers in definitions required? That is, is
Yes, what else would a definition define?
|> the following code legit:
|>
|> int foo(int /* a */, int b);
No. But this is not a definition (so this is unrelated to your first
question.)
|>
|> int foo(int /* a */, int b)
This is not allowed either.
|> {
|> /* do some stuff, obviously without using a */
|> }
|>
|> Our compiler (CodeWarrior on the Macintosh) admits this
|> without a complaint, and it's very handy for removing unused
The code _requires_ a diagnostic if compiled by a conformant compiler. Check
that you have set your compiler in that mode, and not for something like C++
etc.
|> argument warnings in a very explicit manner, but I'd
|> obviously be unable to use it in portable code if it were
|> ruled out by the standard.
Cheers
Tanmoy
--
tanmoy@qcd.lanl.gov(128.165.23.46) DECNET: BETA::"tanmoy@lanl.gov"(1.218=1242)
Tanmoy Bhattacharya O:T-8(MS B285)LANL,NM87544-0285,USA H:#3,802,9 St,NM87545
Others see <gopher://yaleinfo.yale.edu:7700/00/Internet-People/internet-mail>,
<http://alpha.acast.nova.edu/cgi-bin/inmgq.pl>or<ftp://csd4.csd.uwm.edu/pub/
internetwork-mail-guide>. -- <http://nqcd.lanl.gov/people/tanmoy/tanmoy.html>
fax: 1 (505) 665 3003 voice: 1 (505) 665 4733 [ Home: 1 (505) 662 5596 ]
Technical Details
Message-ID:
<43p9bn$l6l@newshost.lanl.gov>Path:
arc1-ca.pugleaf.net!qcd.lanl.gov!tanmoyReferences:
<awiner-1909952245190001@awiner-mac2.us.oracle.com>Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!qcd.lanl.gov!tanmoy From: tanmoy@qcd.lanl.gov (Tanmoy Bhattacharya) Newsgroups: comp.std.c Subject: Re: Identifiers in definitions Date: 20 Sep 1995 14:44:07 GMT Organization: Los Alamos National Laboratory Distribution: world Message-ID: <43p9bn$l6l@newshost.lanl.gov> References: <awiner-1909952245190001@awiner-mac2.us.oracle.com> NNTP-Posting-Host: qcd.lanl.gov