home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!usc!hacgate!SDFSERV!johnl
- From: johnl@SDFSERV.hac.com (John Lee)
- Newsgroups: comp.sys.amiga.programmer
- Subject: Re: Version Strings...
- Message-ID: <24661@hacgate.SCG.HAC.COM>
- Date: 8 Jan 93 20:02:51 GMT
- References: <1993Jan8.111612.25180@sunbim.be> <Per_Salmi.0lxs@augs.se>
- Sender: news@hacgate.SCG.HAC.COM
- Organization: Hughes Aircraft Company, El Segundo, CA
- Lines: 30
-
- In article <Per_Salmi.0lxs@augs.se> Per_Salmi@augs.se (Per Salmi) writes:
- >accs1@bagheera.mumath wrote:
- >: In article 93Jan7184001@lk-hp-16.hut.fi, s37732v@snakemail.hut.fi (Markus Juhani Aalto) writes:
- >: >In article <Leon.0byx@abcd.Houghton.MI.US> Leon@abcd.Houghton.MI.US (Leon) writes:
- >: >UBYTE Version[] = "\0$VER: ProgName 1.0 (7.1.92)";
- >:
- >: I wonder why that stays in the executable. I would expect a good compiler
- >: would
- >: through that line away unless it is really referenced.
- >
- >You really got a point there! Why does it?
-
- It's externally visible data that might be referenced by a separate
- module. The compiler can't optimize it away because references to it
- aren't determined until link-time. By then, it's too late since the
- linker can't throw out things in a module.
-
- Now, if it had been declared:
-
- static UBYTE Version[] = "\0$VER: ProgName 1.0 (7.1.92)";
-
- then the compiler might have noticed the lack of references and
- optimized it away.
-
- -------------------------------------------------------------------------------
- The crew faces deadly GURUs! Next time on AmigaDOS: The Next Generation.
- +--------+ John Lee
- | HUGHES |
- +--------+ Internet: jhlee@hac2arpa.hac.com
- The above opinions are those of the user and not of those of this machine.
-