I found Ofast level opt in the doc of gcc on http://gcc.gnu.org/onlinedocs/gcc/Optimize-Options.html#Optimize-Options.
But when i compile my code using this level,gcc told me not recognize this flag.
I’m using gcc 4.5.2 which is the most recently released gcc.
So which version of gcc support this level?
Tnanks.
I found Ofast level opt in the doc of gcc on http://gcc.gnu.org/onlinedocs/gcc/Optimize-Options.html#Optimize-Options . But
Share
The
-Ofastflag is a new feature in GCC 4.6 — see the list of changes here.It turns on
-ffast-math, so be careful if you need strict FP semantics.The GCC manual documents what else it turns on, including
-fallow-store-data-racesand-fno-semantic-interposition.(It doesn’t enable instruction-set options like
-march=native, you need to do that separately if you want to optimize as much as possible for your machine and make a binary that might not run on other CPUs.)