X-Authentication-Warning: delorie.com: mailnull set sender to djgpp-bounces using -f Message-ID: <3C846DDA.8E71F1ED@earthlink.net> From: Martin Ambuhl Organization: Nocturnal Aviation X-Mailer: Mozilla 4.77 [en] (Win95; U) X-Accept-Language: en,de-CH,fr,ru,zh-CN,ja MIME-Version: 1.0 Newsgroups: comp.os.msdos.djgpp Subject: Re: "Hello World !" growed from 361 KB to 730 KB ! What's going on ? References: Content-Type: text/plain; charset=koi8-r Content-Transfer-Encoding: 7bit Lines: 49 Date: Tue, 05 Mar 2002 07:04:02 GMT NNTP-Posting-Host: 64.154.77.1 X-Complaints-To: abuse AT earthlink DOT net X-Trace: newsread1.prod.itd.earthlink.net 1015311842 64.154.77.1 (Mon, 04 Mar 2002 23:04:02 PST) NNTP-Posting-Date: Mon, 04 Mar 2002 23:04:02 PST X-Received-Date: Mon, 04 Mar 2002 23:04:04 PST (newsmaster1.prod.itd.earthlink.net) To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Reply-To: djgpp AT delorie DOT com Traveler wrote: > > Compiling the trivial "Hello World!" program with gcc v.2.95.3 produces an > executable whitch size is about 360 Kb (with "-O3" switch). > > When compiling the same code with gcc v.3.0.4 the result is an program > whitch size is allmost 1 MB ! > > Can anybody explain this ? I do not get results like yours. This C program: #include int main(void) { printf("Hello, World!\n"); return 0; } produces execuatables of: 74,454 bytes (-O3) 41,472 bytes (stripped) 23,976 bytes (upx'ed) while this C++ program #include int main() { std::cout << "Hello, World!\n" << std::endl; } produces executables of: 743,636 bytes (-O2) 236,544 bytes (stripped) 86,104 bytes (upx'ed) /* vi: set cindent ts=4 sw=4 et tw=72: */ -- It is better that the grammarians should chide us than that the people should not understand us. - St. Augustine