Path: utzoo!mnetor!tmsoft!torsqnt!lethe!yunexus!ists!helios.physics.utoronto.ca!news-server.csri.toronto.edu!cs.utexas.edu!swrinde!elroy.jpl.nasa.gov!ames!uhccux!munnari.oz.au!manuel!csc.canberra.edu.au!echo!eyal From: eyal@echo.canberra.edu.au (Eyal Lebedinsky) Newsgroups: comp.std.c Subject: Re: 3.7.2 External Object Definitions Message-ID: Date: 7 Feb 91 06:49:14 GMT References: <14327:Feb622:47:1391@kramden.acf.nyu.edu> Sender: news@csc.canberra.edu.au Organization: Info Sci & Eng, University of Canberra Lines: 23 In <14327:Feb622:47:1391@kramden.acf.nyu.edu> brnstnd@kramden.acf.nyu.edu (Dan Bernstein) writes: >Say struct foo's first element points to struct bar, and vice versa. >Here's how to initialize mutually referencing static structures: > static struct { > struct foo f; > struct bar b; > } x = { > { &x.b }, > { &x.f } > }; >Done. Most compilers will use fixed addresses for &x.b and &x.f, so this >will be just as efficient as separate static structure declarations. > [stuff deleted] Yes, this would work. It is a practical solution and I may do it. But I STILL want to know how to do it STRAIGHT, as ANSI intended. After all, this is comp.std.c, not comp.lang.c. >---Dan