This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Inline functiion in GCC


On Friday 06 August 2004 22:20, James E Wilson wrote:
> Paul Brook wrote:
> > Like most compilers, gcc generates very poor code if you don't turn
> > optimization on.
>
> But don't most compilers emit optimized code by default nowadays?  We
> would eliminate some of the questions we get if we defaulted to -O1
> instead of -O0.

I think that would get us more questions.

With -O0 it's usually obvious that the compiler isn't even trying.
With -O1 it's doing some optimization, but not much. We'll still get the "why 
does gcc generate worse code than (X)" questions. In addition we'll get more 
"why can't I debug my program properly" questions due to artifacts introduced 
by optimization. -O1 gives reasonably debuggable code, but it's definitely 
not prefect.

Paul


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]