Mailinglist Archive: opensuse (3644 mails)

< Previous Next >
Re: [SLE] GCC3.0 Vs GCC2.96: Query:
  • From: Anders Johansson <andjoh@xxxxxxxxxxxxxxxxxxxxx>
  • Date: Wed, 20 Mar 2002 15:37:54 +0100
  • Message-id: <200203201537.54616.andjoh@xxxxxxxxxxxxxxxxxxxxx>
On Wednesday 20 March 2002 15.13, Keith Winston wrote:
I haven't used any of the 3.x series of compilers, but I do know that one
of the things the compiler does with -O2 is inline some functions, e.g.

Actually, that's one of the few things -O2 *doesn't* do :)

From the gcc man page

-O2 Optimize even more. Nearly all supported optimiza­
tions that do not involve a space-speed tradeoff
are performed. Loop unrolling and function inlin­
ing are not done, for example. As compared to -O,
this option increases both compilation time and the
performance of the generated code.

You'd have to use -finline-functions for that. As far as I know this behaviour
is unchanged in gcc 3.0. There, you have -O3 which does do function inlining.

As for the sizes, I wonder if everything has been stripped, and what other
options were used. And 2.96 is an internal gnu pre-release, with a few redhat
hacks to make it work at all. Who knows what that thing does or doesn't do.

//Anders

< Previous Next >
Follow Ups