Path: utzoo!attcan!uunet!lll-winken!brutus.cs.uiuc.edu!tut.cis.ohio-state.edu!cwjcc!gatech!bloom-beacon!mit-eddie!genrad!decvax!ima!cfisun!lakart!dg From: dg@lakart.UUCP (David Goodenough) Newsgroups: comp.lang.c Subject: Re: forward references in typedefs Message-ID: <632@lakart.UUCP> Date: 27 Jul 89 16:07:07 GMT References: <1989Jul20.152935.14872@utzoo.uucp> Organization: Lakart Corporation, Newton, MA Lines: 21 henry@utzoo.uucp (Henry Spencer) sez: > The latter. The language permits forward references with structure tags > (specifically, "struct foo *x;" when foo has not yet been seen) but not > the equivalent with typedefs. That's just the way it is. > > (Oh, you want to know *why*? Basically, because typedefs are a royal pain > to parse at the best of times, and forward references just complicate the > issue hopelessly. Also, have you considered the following: typedef a *b; typedef b *a; There, now your compiler is _REALLY_ confused :-) -- dg@lakart.UUCP - David Goodenough +---+ IHS | +-+-+ ....... !harvard!xait!lakart!dg +-+-+ | AKA: dg%lakart.uucp@xait.xerox.com +---+