X-pop3-spooler: POP3MAIL 2.1.0 b 4 980420 -bs- Delivered-To: pcg AT goof DOT com Message-ID: <3562EC4C.41F93E45@ehv.sc.philips.com> Date: Wed, 20 May 1998 16:44:28 +0200 From: Remco van den Berg Organization: Philips Semiconductors B.V. X-Mailer: Mozilla 4.04 [en] (X11; U; HP-UX B.10.10 9000/819) MIME-Version: 1.0 To: beastium-list AT Desk DOT nl Subject: size differences g++ en gcc Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: Marc Lehmann Status: RO X-Status: A Content-Length: 792 Lines: 30 Can somebody explain to me why normal C code compiled with G++ is smaller in size than when I compile it with GCC ? For example, this very original program: #include int main(void) { printf( "Hello world!\n" ); return 0; } compiles into a 6532 bytes 'big' executable using `gcc main.c`. (After stripping.) Using g++ it's only 3032 bytes of size. I also had the feeling that the pgcc compiler generates larger code than gcc-2.7.2. Is that all because of the optimization? Regards, Remco van den Berg -- /***************************************************************************\ |* UNIX is user friendly. It's just selective about who its friends are. *| \***************************************************************************/