Path: utzoo!utgpu!news-server.csri.toronto.edu!bonnie.concordia.ca!uunet!mcsun!ukc!edcastle!as From: as@castle.ed.ac.uk (A Stevens) Newsgroups: eunet.micro.acorn,comp.sys.acorn Subject: Re: Possible bug in C compiler Message-ID: <7927@castle.ed.ac.uk> Date: 19 Jan 91 13:03:48 GMT References: <1991Jan18.150311.23599@cns.umist.ac.uk> Organization: Edinburgh University Computing Service Lines: 23 In article <1991Jan18.150311.23599@cns.umist.ac.uk> vanaards%t7@uk.ac.man.cs writes: > > I've just compiled this source, only a few warnings, but unexpectidly >I discovered that the executable is about 1Meg long!!! How can that be, >is this really a bug in the C compiler - could someone else verify my >results. > > Thanks. > > From my experience with compiling a Prolog system I suspect the problem is those large global arrays. As I recall ANSI-C allocates them into the o. files! You can cure this behaviour (as I recall) by compiling with the -pcc flag. This switches global arrays from initialised to unitialised data. I recall a ``volatile'' decalration also helped - buy that might produce lousy code. This bug is fixed in the latest beta releases of C I am told. This is all from memory ... Andrew