Path: utzoo!utgpu!jarvis.csri.toronto.edu!cs.utexas.edu!wuarchive!mailrus!purdue!haven!adm!smoke!gwyn From: gwyn@smoke.BRL.MIL (Doug Gwyn) Newsgroups: comp.lang.c Subject: Re: self contained pointers to structures Message-ID: <11690@smoke.BRL.MIL> Date: 27 Nov 89 20:47:04 GMT References: <10350@attctc.Dallas.TX.US> Reply-To: gwyn@brl.arpa (Doug Gwyn) Organization: Ballistic Research Lab (BRL), APG, MD. Lines: 17 In article <10350@attctc.Dallas.TX.US> bobc@attctc.Dallas.TX.US (Bob Calbridge) writes: >struct event { > struct event *next; >}; >Of course, the compiler complains because the definition of the structure is >incomplete at that point. What do you mean, "of course"? That is a perfectly valid C construct and is in fact quite common. Some deficient compilers do have a problem with such constructs, and there are a number of work-arounds possible. One is struct event; /* incomplete type to get entry into symbol table */ struct event { struct event *next; /* should be accepted now */ };