Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!cornell!uw-beaver!uw-june!ka From: ka@june.cs.washington.edu (Kenneth Almquist) Newsgroups: comp.lang.c Subject: Re: Recursive #includes Keywords: recursive includes, modularity Message-ID: <7488@june.cs.washington.edu> Date: 6 Mar 89 11:12:10 GMT References: <570@marob.MASA.COM> <9727@smoke.BRL.MIL> <964@philmds.UUCP> <3804@xyzzy.UUCP> Organization: U of Washington, Computer Science, Seattle Lines: 23 In article <3804@xyzzy.UUCP>, throopw@agarn.dg.com (Wayne A. Throop) writes: > But note that each module only needs to be able to declare a pointer > to the other's type. In C, this can be done using incompleted types. > (See section 3.5.2.3 of pANS, and especially footnote 48 of that > section.) I've been told that incomplete types cannot be used in function prototypes. For example, void f(struct s *); struct s { int i; }; void f(struct s *p) { ... } is illegal because s is not defined when the function prototype for f is processed. If so, this makes Wayne's suggestion pretty useless. Have I been misinformed? Kenneth Almquist