Path: utzoo!attcan!utgpu!jarvis.csri.toronto.edu!mailrus!tut.cis.ohio-state.edu!purdue!ames!apple!motcsd!hpda!hpcuhb!hpcllla!hpclisp!hpclwjm!walter From: walter@hpclwjm.HP.COM (Walter Murray) Newsgroups: comp.lang.c Subject: Re: forward references in typedefs Message-ID: <660045@hpclwjm.HP.COM> Date: 20 Jul 89 19:03:16 GMT References: <55480@tut.cis.ohio-state.edu> Organization: Hewlett-Packard Calif. Language Lab Lines: 32 George M. Jones writes: > typedef struct one > { > two_t *foo; > } one_t; > typedef struct two > { > one_t *bar; > } two_t; This code is incorrect by the syntax rules of ANSI C. The identifier 'two_t' by itself is not a valid type-specifier in the declaration of 'foo', unless it has previously been defined as a typedef name. This is probably what you want: typedef struct one one_t; typedef struct two two_t; struct one { two_t *foo; } ; struct two { one_t *bar; } ; Walter Murray --- Not speaking for Hewlett-Packard or X3J11 -------------