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]

C++ vs. C asm/object file size


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


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