From: Paul Shirley Newsgroups: comp.os.msdos.djgpp Subject: Re: Excessive exe sizes Date: Tue, 2 Dec 1997 03:34:59 +0000 Organization: wot? me? Lines: 21 Distribution: world Message-ID: References: <97Nov25.163503gmt+0100 DOT 17026 AT internet01 DOT amc DOT de> Reply-To: Paul Shirley NNTP-Posting-Host: chocolat.foobar.co.uk Mime-Version: 1.0 To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Precedence: bulk In article , Eli Zaretskii writes >> does any other C++ compiler have this problem? > >I have no idea. I try to stay away of C++ as much as I can. Maybe other >compilers just let you fail if you define the same object twice? In C++ multiple global instances of the same variable is an error, even if they match in type and size. gxx and VC4 both trap this at link time. On VC4 I'm seeing an 18K .exe containing 'int a[1000000];' so it looks like this goes into BSS OK on VC4. Looks like a gcc misfeature. So the question becomes: why does gxx really not put them into BSS? The destructor argument makes no sense since its illegal to merge variable instances this way, so multiple destructors *cannot* exist. --- Paul Shirley: my email address is 'obvious'ly anti-spammed