Pointers to Incomplete Types in Prototypes

Norman Diamond diamond at jit533.swstokyo.dec.com
Mon May 13 10:41:20 AEST 1991


In article <16108 at smoke.brl.mil> gwyn at smoke.brl.mil (Doug Gwyn) writes:
>In article <1991May10.011038.6781 at tkou02.enet.dec.com> diamond at 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 at 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.



More information about the Comp.std.c mailing list