Re: C++ vs C executable file size
From: Alwyn (dt015a1979_at_mac.com.invalid)
Date: 10/03/04
- Next message: White Wolf: "Re: C++ vs C executable file size"
- Previous message: Alain Cabiran: "Re: C++ vs C executable file size"
- In reply to: Alain Cabiran: "Re: C++ vs C executable file size"
- Next in thread: White Wolf: "Re: C++ vs C executable file size"
- Reply: White Wolf: "Re: C++ vs C executable file size"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Sun, 03 Oct 2004 22:38:58 +0100
In article <41606c96$0$15748$7a628cd7@news.club-internet.fr>, Alain
Cabiran <alain@yoko.priv> wrote:
>
> You compare different code ... have you tried compiling the same code
> with both gcc and g++ ? Here, the dynamic g++ size is 300 bytes larger
> but static ones are the same. (about 430Kb with gcc/g++ 3.0 on ia32)
>
> the difference between sizes in your example is a little bit ...
> "triché" (cheated) :-)
Mais oui, je parle français, moi aussi!
> One uses stl but not the other.
One uses the C standard library and the other the C++ standard library
to produce the same result. How can you call that *triché*?
Anyway, GCC is capable of taking the same C code and producing in C++
mode what seems to be exactly the same object:
~ $ cp hello.c hello3.cc
~ $ cat hello3.cc
#include <stdio.h>
int main(void)
{
puts("Hello world!");
}
~ $ c++ -o hello3 hello3.cc
~ $ ./hello3
Hello world!
~ $ ls -l hello3
-rwxr-xr-x 1 alwyn alwyn 11548 3 Oct 22:36 hello3
~ $
Alwyn
- Next message: White Wolf: "Re: C++ vs C executable file size"
- Previous message: Alain Cabiran: "Re: C++ vs C executable file size"
- In reply to: Alain Cabiran: "Re: C++ vs C executable file size"
- Next in thread: White Wolf: "Re: C++ vs C executable file size"
- Reply: White Wolf: "Re: C++ vs C executable file size"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|