| www.delorie.com/archives/browse.cgi | search |
| X-pop3-spooler: | POP3MAIL 2.1.0 b 4 980420 -bs- |
| Delivered-To: | pcg AT goof DOT com |
| Message-ID: | <19980521173236.63995@cerebro.laendle> |
| Date: | Thu, 21 May 1998 17:32:36 +0200 |
| From: | Marc Lehmann <pcg AT goof DOT com> |
| To: | beastium-list AT Desk DOT nl |
| Subject: | Re: size differences g++ en gcc |
| Mail-Followup-To: | beastium-list AT Desk DOT nl |
| References: | <3562EC4C DOT 41F93E45 AT ehv DOT sc DOT philips DOT com> |
| Mime-Version: | 1.0 |
| In-Reply-To: | <3562EC4C.41F93E45@ehv.sc.philips.com>; from Remco van den Berg on Wed, May 20, 1998 at 04:44:28PM +0200 |
| X-Operating-System: | Linux version 2.1.101 (root AT cerebro) (gcc version pgcc-2.91.28 19980508 (gcc2 ss-980502 experimental)) |
| Status: | RO |
| Lines: | 21 |
On Wed, May 20, 1998 at 04:44:28PM +0200, Remco van den Berg wrote:
> Can somebody explain to me why normal C code compiled with G++ is
> smaller in size than when I compile it with GCC ?
It isn't. I'm pretty sure you are comparing different compileres, i.e. your
"gcc" might be pgcc, while your "g++" might be gcc-2.7.2 or sth. else. (Have
you compiled it yourself or installed both packages?).
> I also had the feeling that the pgcc compiler generates larger
> code than gcc-2.7.2. Is that all because of the optimization?
Yes. Given some compiler switches, you should be able to get smaller
programs then 2.7.2 (-m486) as well. (try -O2 -Os).
-----==- |
----==-- _ |
---==---(_)__ __ ____ __ Marc Lehmann +--
--==---/ / _ \/ // /\ \/ / pcg AT goof DOT com |e|
-=====/_/_//_/\_,_/ /_/\_\ --+
The choice of a GNU generation |
|
| webmaster | delorie software privacy |
| Copyright © 2019 by DJ Delorie | Updated Jul 2019 |