This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

g++-19980531: Big executables.


Hello everybody.

I think that egcs generates unnecessary big executables.
This is what I did:

> uname -a
SunOS demokrit 5.5.1 Generic sun4u sparc SUNW,Ultra-1
> cat test1.cc
int main()
{
}
> cat test2.cc
#include <string>

int main()
{
}
> g++ -Wall -g test1.cc -o test1.out
> g++ -Wall -g test2.cc -o test2.out
> ll test*out
-rwxr-xr-x   1 stab       37592 Jul 15 16:50 test1.out*
-rwxr-xr-x   1 stab       68236 Jul 15 16:51 test2.out*
> strip test*out
> ll test*out
-rwxr-xr-x   1 stab        9584 Jul 15 16:51 test1.out*
-rwxr-xr-x   1 stab       13936 Jul 15 16:51 test2.out*

Although the string class is not used at all, including it costs more than
30kByte additional memory when compiling with -g. And, after stripping, it's
still more than 4k.

There seems to be some unnecessary instantiation going on.

Best regards, 
Dirk Herrmann



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]