[clang] [clang] Add deprecation warning for `-Ofast` driver option (PR #98736)

James Y Knight via cfe-commits cfe-commits at lists.llvm.org
Sun Jul 14 08:38:54 PDT 2024


================
@@ -442,6 +442,9 @@ def warn_drv_deprecated_arg : Warning<
 def warn_drv_deprecated_arg_no_relaxed_template_template_args : Warning<
   "argument '-fno-relaxed-template-template-args' is deprecated">,
   InGroup<DeprecatedNoRelaxedTemplateTemplateArgs>;
+def warn_drv_deprecated_arg_ofast : Warning<
+  "argument '-Ofast' is deprecated; use '-O3', possibly with '-ffast-math'">,
----------------
jyknight wrote:

Maybe worth using a few more words? E.g.
`argument '-Ofast' is deprecated; use '-O3' for standard optimization, or '-O3 -ffast-math' if non-standard "fast-math" was desired`

I'm not sure if that's too long.

https://github.com/llvm/llvm-project/pull/98736


More information about the cfe-commits mailing list