Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.1 6/24/83 SMI; site sun.uucp Path: utzoo!linus!decvax!decwrl!sun!gnu From: gnu@sun.uucp (John Gilmore) Newsgroups: net.lang.c Subject: Re: forward declared structures Message-ID: <1605@sun.uucp> Date: Thu, 9-Aug-84 01:19:26 EDT Article-I.D.: sun.1605 Posted: Thu Aug 9 01:19:26 1984 Date-Received: Fri, 10-Aug-84 07:52:24 EDT References: <77@datagen.UUCP> Organization: Sun Microsystems, Inc. Lines: 13 Another way I've used forward declared (actually undeclared) structures is when I have a large structure full of "global" variables, many of which are pointers to other structures. If the compiler required a definition of every structure which I declare a pointer to, I'd have to include every include file in every program -- and edit every program each time I added another struct * to the global structure. The way it is now, (4.2BSD cc, Unisoft V7, MIT cc68, etc) I only need to declare a structure if I'm going to dereference the pointer (use it to point to a member) in this module. If I don't touch it, or if I just assign it or pass it as a parameter, the compiler doesn't need to know what's inside the struct it points to. I'd hate to lose this feature. Does ANSI C break it?