Re: -O2 vs -O3

From: Dave Jones (
Date: Wed May 24 2000 - 13:13:22 EST

Christopher Thompson <> wrote:
> Linux kernels are compiled with the -O2 flag set. I'm curious, why don't we
> use -O3?

During the early development of Powertweak I set the Makefile files to compile
some routines with -O3 instead of -O2. I then spent hours looking for a bug
which wasn't there. The optimiser was over-zealous, and removed a pointer

So I guess -O2 implies that we use only the known-to-be-safe optimisations.

On a sidenote, the optimiser in egcs 2.91.66 still generates bugged code in some
situations which can only be worked around by setting -O0
(Example available upon request)



- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to Please read the FAQ at

This archive was generated by hypermail 2b29 : Wed May 31 2000 - 21:00:13 EST