[clang] [clang] Improve Ofast Warning (PR #183002)
Sam Elliott via cfe-commits
cfe-commits at lists.llvm.org
Thu Apr 9 13:49:38 PDT 2026
lenary wrote:
Yeah, indeed. We had reached the conclusion that the behaviour is complex if there are two optimisation levels specified and one is `-Ofast`. IMO this means if you have `-Ofast` and another level, you need the warning, in addition to if just `-Ofast` is specified. The easiest way to detect this is to just look for `-Ofast`.
I do want us to support users that have build systems where e.g. `-Ofast` is in their default flags, and then they add flags to override the effective optimisation level for
I meant to confirm that there is still a `-Wno-error=` option that ensures `-Werror` users can stop this breaking their build - and indeed `-Wno-error=deprecated-ofast` works for this.
https://github.com/llvm/llvm-project/pull/183002
More information about the cfe-commits
mailing list