This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Code Bloat g++
- To: NEELAKANTH dot NADGIR at SUN dot COM
- Subject: Re: Code Bloat g++
- From: "Martin v. Loewis" <martin at loewis dot home dot cs dot tu-berlin dot de>
- Date: Tue, 15 Feb 2000 23:13:11 +0100
- CC: gcc at gcc dot gnu dot org
- References: <20000215115039.A2292@neel>
> I am not sure if this is the right place to discuss this, but I am
> seeing massive code bloat with g++ 2.95.2
The place is right; the information is wrong. What system? On
i586-pc-linux-gnu, glibc 2.1.3, shared libstdc++, I cannot at all
reproduce this effect I'm compiling oopack_v1p8.C with -O0..4, with
and without -g. The resulting executables are
-rwxrwxr-x 1 martin martin 37767 Feb 15 23:07 o0
-rwxrwxr-x 1 martin martin 21937 Feb 15 23:07 o1
-rwxrwxr-x 1 martin martin 21969 Feb 15 23:07 o2
-rwxrwxr-x 1 martin martin 22641 Feb 15 23:08 o3
-rwxrwxr-x 1 martin martin 62535 Feb 15 23:08 o0g
-rwxrwxr-x 1 martin martin 46809 Feb 15 23:08 o1g
-rwxrwxr-x 1 martin martin 46745 Feb 15 23:08 o2g
-rwxrwxr-x 1 martin martin 48753 Feb 15 23:08 o3g
All those are unstripped. After stripping, I get
-rwxrwxr-x 1 martin martin 13412 Feb 15 23:10 o0
-rwxrwxr-x 1 martin martin 10948 Feb 15 23:10 o1
-rwxrwxr-x 1 martin martin 10980 Feb 15 23:10 o2
-rwxrwxr-x 1 martin martin 11652 Feb 15 23:10 o3
So this is a factor of 2 for the -O3 executable.
Anyway, as Alexandre points out: this is debugging information, so
what is the problem?
Regards,
Martin