This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
C++ vs. C asm/object file size
- To: EGCS Development Group <egcs at cygnus dot com>
- Subject: C++ vs. C asm/object file size
- From: Benjamin Scherrey <scherrey at gte dot net>
- Date: Mon, 11 Jan 1999 04:04:56 -0500
- Organization: Proteus Technologies, Inc.
- Reply-To: scherrey at proteus-tech dot com
I've built some C code that I've altered to be buildable in C++ as well.
Building this identical code (since it still builds in C as altered) the
g++ produces slightly larger .o files than the gcc compiler. This seems
to make sense as I expect the name mangling (I didn't use extern "C" in
the conversion) would produce this effect possibly - right? So - I throw
in the -S option to both compilers to see how the generated assembly
code is different. Turns out both g++ and gcc product IDENTICAL assembly
code and the files are the same size! Please explain these results to
me. If I get identical assembly language output why wouldn't I get
identical object files?!?!?
thanx & later,
Ben Scherrey