Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!ames!ncar!gatech!mcnc!decvax!ima!cfisun!lakart!dg From: dg@lakart.UUCP (David Goodenough) Newsgroups: comp.lang.c Subject: Re: mutual reference in structures Message-ID: <539@lakart.UUCP> Date: 8 May 89 14:42:44 GMT References: <6712@medusa.cs.purdue.edu> Organization: Lakart Corporation, Newton, MA Lines: 31 From article <6712@medusa.cs.purdue.edu>, by bouma@cs.purdue.EDU (William J. Bouma): > Please tell me how to get C to accept the following or equivalent code: > > typedef union a { > b_ *pb; > } a_; > > typedef struct b { > a_ va; > } b_; Trivial. Get rid of the typedefs. union a { struct b *pb; }; struct b { union a va; }; works just fine on my compiler. (Greenhills family) Yet another reason not to get typedef happy :-) -- dg@lakart.UUCP - David Goodenough +---+ IHS | +-+-+ ....... !harvard!xait!lakart!dg +-+-+ | AKA: dg%lakart.uucp@xait.xerox.com +---+