Path: utzoo!utgpu!water!watmath!clyde!att!osu-cis!tut.cis.ohio-state.edu!mailrus!nrl-cmf!ames!amdcad!sun!pitstop!sundc!seismo!uunet!mcvax!ukc!stl!stc!root44!hrc63!pjmp From: pjmp@hrc63.co.uk (Peter Polkinghorne) Newsgroups: comp.lang.c++ Subject: static cross references Keywords: static definition declaration Message-ID: <534@hrc63.co.uk> Date: 23 Sep 88 13:07:28 GMT Organization: GEC Hirst Research Centre, Wembley, England. Lines: 25 There seems to be something lacking in the treatment of statics, or I am missing something :-). With cc on Suns it is possible to declare a static before it is defined using extern. This does seem a little dubious. However trying this trick on CC (AT&T Cfront v1.1) produces the justifiable complaint b static and not static. /* test of static refs */ extern void *b; static void * a = &b; static void * b = &a; main() { }/*main*/ /*end test*/ It would be nice to be able declare statics before they are defined so as to be able initialise statics which refer to eachother. At present the only solution seems to be to make one extern and thus global. Peter Polkinghorne UUCP: ...!mcvax!ukc!hrc63!pjmp "Mebyon Kernow" DOMAIN: pjmp@uk.co.gec-rl-hrc NB Reply to, From path in news is wrong, please use one the above for mail.