Mail Archives: djgpp/1997/12/02/03:31:18
In article <Pine DOT SUN DOT 3 DOT 91 DOT 971125174221 DOT 28212Q-100000 AT is>, Eli Zaretskii
<eliz AT is DOT elta DOT co DOT il> 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
- Raw text -