Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP
Posting-Version: version B 2.10.1 6/24/83; site utmbvax.UUCP
Path: utzoo!watmath!clyde!burl!mgnetp!ihnp4!zehntel!hplabs!hao!seismo!ut-sally!utmbvax!mmr
From: mmr@utmbvax.UUCP (Mike Rubenstein)
Newsgroups: net.lang.c
Subject: Re: forward declared structures
Message-ID: <353@utmbvax.UUCP>
Date: Thu, 2-Aug-84 23:36:38 EDT
Article-I.D.: utmbvax.353
Posted: Thu Aug  2 23:36:38 1984
Date-Received: Sun, 5-Aug-84 05:12:20 EDT
References: <226@siemens.UUCP> <884@bbncca.ARPA>
Organization: U. Texas Medical Branch, Galveston, Texas
Lines: 27

>	A structure or union specifier of the second form, that is, one of
>	    struct identifier { struct-decl-list }
>	    union identifier { struct-decl-list }
>	declares the identifier to be the structure tag (or union tag) of
>       the structure specified by the list.  A SUBSEQUENT declaration may
>	then use the third form of specifier, one of
>	    struct identifier
>	    union identifier
>	Structure tags allow definition of self-referential structures; . . .
>	a structure or union may contain a pointer to an instance of itself.

>Capitalization of SUBSEQUENT is mine.  Implicitly within this "subsequent"
>means subsequent to the "struct identifier {" rather than subsequent to the
>entire declaration, otherwise structures containing pointers to themselves
>would not be allowed.

On the other hand, a few months ago I was working with a compiler that
handles this "correctly."  Unfortunately, I wanted to declare something
like

	struct foo     { struct bar *b };
	struct bar     { struct foo *f };

Frustrating.
-- 

	Mike Rubenstein, OACB, UT Medical Branch, Galveston TX 77550