Article View: comp.std.c
Article #2877Re: Pointers to Incomplete Types in Prototypes
From: Norman Diamond
Date: Mon, 13 May 1991 00:41
Date: Mon, 13 May 1991 00:41
29 lines
2225 bytes
2225 bytes
In article <16108@smoke.brl.mil> gwyn@smoke.brl.mil (Doug Gwyn) writes:
>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.
(This was wrong. However, Mr. Gwyn proceeds to make a different mistake.)
>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.
Misuse of converses does lead to logical fallacies, but I do think that
converses apply in certain situations. If we allow the compiler to say
that lots of things are declarations, when the standard does not explicitly
prohibit them from being declarations, then the compiler could reject lots
of programs that should be legal.
Although the standard's rules should be interpreted mathematically as
"if (A) then (Z); if (B) then (Z); etc."
rules, we'd better interpret them technologically as
"(Z) if-and-only-if (A) or (B) or etc."
in order to have any use at all.
--
Norman Diamond diamond@tkov50.enet.dec.com
If this were the company's opinion, I wouldn't be allowed to post it.
Permission is granted to feel this signature, but not to look at it.
Technical Details
Message-ID:
<1991May13.004120.26457@tkou02.enet.dec.com>Path:
arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!rpi!usc!elroy.jpl.nasa.gov!decwrl!pa.dec.com!jrdzzz.jrd.dec.com!tkou02.enet.dec.com!jit533!diamondReferences:
<w!2g7+c@rpi.edu> <7330008@hpfcso.FC.HP.COM> <1991May10.011038.6781@tkou02.enet.dec.com> <16108@smoke.brl.mil>Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!rpi!usc!elroy.jpl.nasa.gov!decwrl!pa.dec.com!jrdzzz.jrd.dec.com!tkou02.enet.dec.com!jit533!diamond From: diamond@jit533.swstokyo.dec.com (Norman Diamond) Newsgroups: comp.std.c Subject: Re: Pointers to Incomplete Types in Prototypes Message-ID: <1991May13.004120.26457@tkou02.enet.dec.com> Date: 13 May 91 00:41:20 GMT References: <w!2g7+c@rpi.edu> <7330008@hpfcso.FC.HP.COM> <1991May10.011038.6781@tkou02.enet.dec.com> <16108@smoke.brl.mil> Sender: usenet@tkou02.enet.dec.com (USENET News System) Reply-To: diamond@jit533.enet@tkou02.enet.dec.com (Norman Diamond) Organization: Digital Equipment Corporation Japan , Tokyo Lines: 29