-O also turns on -fomit-frame-pointer on machines where doing so does not
interfere with debugging.
-O doesn’t turn on -ftree-sra for the Ada compiler. This option must be
explicitly specified on the command line to be enabled for the Ada compiler.
-O2 Optimize even more. GCC performs nearly all supported optimizations that do
not involve a space-speed tradeoff. The compiler does not perform loop
unrolling or function inlining when you specify -O2. As compared to -O, this
option increases both compilation time and the performance of the generated
-O2 turns on all optimization flags specified by -O. It also turns on the fol-
lowing optimization flags: