Mail Archives: djgpp/1995/06/28/13:13:24
> C++ program A.OUT size unstripped A.OUT size stripped
> int x[10000]; main(){} 52269 44140
> main(){} 15387 7276
> (difference) 36882 36864
>
> Why does declaring the array `x' add so much size to A.OUT? Surely there is
> a more compact way of telling the loader to set the next 40000 bytes of RAM to
This has popped up some time ago. As far as I remember, this is a genuine
GCC (mis)feature, not something specific to DJGPP, and it only happens if
the above is compiled as C++ code; if you compile it as C program, you get
what you expect. I don't know if GCC 2.7 corrected this.
Caveat: my memory sucks when such subtle details are involved, and I don't
really work in C++ anyway, but you can use the search engine at DJGPP Web
server to find the relevant thread in the mailing list archives, at this
URL:
http://www.delorie.com/djgpp/mail-archives/
- Raw text -