delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1997/11/25/10:34:55

From: Christopher Croughton <crough45 AT amc DOT de>
Message-Id: <97Nov25.163503gmt+0100.17026@internet01.amc.de>
Subject: Re: Excessive exe sizes
To: eliz AT is DOT elta DOT co DOT il (Eli Zaretskii)
Date: Tue, 25 Nov 1997 16:33:05 +0100
Cc: crough45 AT amc DOT de, djgpp AT delorie DOT com
In-Reply-To: <Pine.SUN.3.91.971125170856.28212I-100000@is> from "Eli Zaretskii" at Nov 25, 97 04:12:56 pm
Mime-Version: 1.0

Eli Zaretskii wrote:
> 
> That's exactly what happens--in C programs.  In C++, there's a potential
> problem with such declarations (see section 8.14 of the FAQ) which GCC
> resolves by including the array in the executable (there's a switch to
> disable this behavior). 

I get it (having reread that section, and the equivalent bit of the GCC
documentation, several times).  This is because it would somehow merge
duplicate definitions, yes?  So if you said "int x; int x;" it would
merge tham and then generate code to destroy 'x' twice?  Sounds like
a bug in GCC to me, not a (mis)feature; does any other C++ compiler
have this problem?

In the meantime, it sounds as though compressing the executable is the 
answer.  Or are there problems with that as well?

Chris C

- Raw text -


  webmaster     delorie software   privacy  
  Copyright 2019   by DJ Delorie     Updated Jul 2019