Article View: comp.std.c
Article #2870Re: Pointers to Incomplete Types in Prototypes
From: Doug Gwyn
Date: Fri, 10 May 1991 23:51
Date: Fri, 10 May 1991 23:51
18 lines
1568 bytes
1568 bytes
In article <1991May10.011038.6781@tkou02.enet.dec.com> diamond@jit533.enet@tkou02.enet.dec.com (Norman Diamond) writes:
>The problem, as someone else pointed out, is that struct 'bar'
>IS NOT DECLARED in the parameter list. It is REFERENCED in the
>parameter list.
No, you're making distinctions of your own that the standard does not
support. Use of "bar" in that context certainly does declare an
identifier "bar" to be a structure tag, according to the syntax of
section 3.5.2.1, which is a subset of the declaration syntax. A
structure can be declared (incompletely or completely) "in passing"
within a "fatter" declaration; note the use of the plural for "entities",
"declarators", and "identfiers" in the second paragraph of 3.5 Semantics.
Absence of the "{ struct-declaration-list }" portion in the syntactic form
used in the source code merely means that the third paragraph in the
Semantics subsection is not relevant. It does not mean that the
declaration does NOT declare a new type; that would be asserting the
converse, which is a logical fallacy.
Technical Details
Message-ID:
<16108@smoke.brl.mil>Path:
arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!usc!elroy.jpl.nasa.gov!ncar!hsdndev!cmcl2!adm!smoke!gwynReferences:
<w!2g7+c@rpi.edu> <7330008@hpfcso.FC.HP.COM> <1991May10.011038.6781@tkou02.enet.dec.com>Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!usc!elroy.jpl.nasa.gov!ncar!hsdndev!cmcl2!adm!smoke!gwyn From: gwyn@smoke.brl.mil (Doug Gwyn) Newsgroups: comp.std.c Subject: Re: Pointers to Incomplete Types in Prototypes Message-ID: <16108@smoke.brl.mil> Date: 10 May 91 23:51:51 GMT References: <w!2g7+c@rpi.edu> <7330008@hpfcso.FC.HP.COM> <1991May10.011038.6781@tkou02.enet.dec.com> Organization: U.S. Army Ballistic Research Laboratory, APG, MD. Lines: 18