Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.2 8/23/84; site ucbcad.UUCP Path: utzoo!watmath!clyde!cbosgd!ihnp4!ucbvax!ucbcad!faustus From: faustus@ucbcad.UUCP (Wayne A. Christopher) Newsgroups: net.lang.c Subject: Re: Re: 4.2 extern a DISASTER (Flame) Message-ID: <100@ucbcad.UUCP> Date: Sun, 28-Jul-85 01:46:01 EDT Article-I.D.: ucbcad.100 Posted: Sun Jul 28 01:46:01 1985 Date-Received: Mon, 29-Jul-85 06:52:36 EDT References: <2643@hplabsc.UUCP> <1281@eagle.UUCP> <1282@eagle.UUCP> <2656@hplabsc.UUCP> Distribution: net Organization: UC Berkeley CAD Group, Berkeley, CA Lines: 38 > This is where the problem is occuring: > > file1.c > > int foo; > > file2.c > > int uses_foo() > > { > extern int foo; > > ... > } > > If I try to run this, > I get various bus errors, etc. (it links OK). It has nothing to do with your declarations of foo. If this didn't work, do you think that anything in 4.2 would compile and run? > The only way to get foo declared as a true external is to include > an initialization: > > file1.c > > int foo=0; This is the default. > My conclusion from all this is that the 4.2 compiler has taken something > which was fairly easy and intuitive to use and made it so complicated > that it is no longer useful. It works the same as it has always worked. You are confused. Stop blaming the compiler when your code doesn't work. Wayne