Structure tags

Doug Gwyn gwyn at smoke.brl.mil
Sat Feb 9 08:09:41 AEST 1991


In article <595 at taumet.com> steve at taumet.com (Stephen Clamage) writes:
-t-itoh at utsm.nm.fujitsu.co.jp (Tsutomu Itoh) writes:
->1a.
->struct foo {int i;};
->struct foo;
->struct foo bar;
-Both of these are ok.  In 1a there is no incomplete declaration.

Sure there is; the second "struct foo" type is not completed.
If any essential use is made of "bar", there is an error.
The second declaration (tag only) in effect cancels the previous
"struct foo" type information for the following code.  This is a
special wart spelled out in 3.5.2.3.



More information about the Comp.std.c mailing list