https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115990
Bug ID: 115990 Summary: Consider deprecating -Ofast Product: gcc Version: unknown Status: UNCONFIRMED Severity: normal Priority: P3 Component: driver Assignee: unassigned at gcc dot gnu.org Reporter: aaron at aaronballman dot com Target Milestone: --- Clang 19 is expected to deprecate the -Ofast compiler option, with hopes to remove the option sometime in the future (currently targeting 2026, but there's flexibility in timeline and approach, including deprecating the option but never removing it). The rationale why the Clang community is deprecating the option may also apply to GCC, and can be summarized as: * Users typically do not expect optimization levels to impact the correctness of valid, correct code, but -Ofast enables -ffast-math which enables non-conforming extensions that can impact the correctness of results. * The name itself leads to people enabling it without realizing what those impacts are. Deprecation ensures that users know about the behavior and it guides users towards being more explicit about their intent with the command line arguments. * The original motivation for adding -Ofast (for compliance with SPEC benchmark rules) no longer applies. Does GCC have an appetite for deprecation with an eye towards eventual removal for -Ofast? Related: https://discourse.llvm.org/t/rfc-deprecate-ofast/78687/ https://github.com/llvm/llvm-project/pull/98736