RFC: Deprecate -Ofast

Here’s something I realized on the way home tonight that is simultaneously a demonstration of what a cursed option -Ofast is and a demonstration that -O3 -ffast-math doesn’t provide a simple replacement.

clang -Ofast -O2 foo.c

What do you think? Is fast-math enabled? Nope. Because -Ofast is an optimization level option, -O2 supersedes it. But, of course, -O3 -ffast-math -O2 does enable fast-math.

5 Likes