File tree Expand file tree Collapse file tree 2 files changed +11
-6
lines changed Expand file tree Collapse file tree 2 files changed +11
-6
lines changed Original file line number Diff line number Diff line change @@ -429,8 +429,11 @@ Code Generation Options
429429
430430 :option: `-Ofast ` Enables all the optimizations from :option: `-O3 ` along
431431 with other aggressive optimizations that may violate strict compliance with
432- language standards. This is deprecated in favor of :option: `-O3 `
433- in combination with :option: `-ffast-math `.
432+ language standards. This is deprecated in Clang-19 and a warning is emitted
433+ that :option: `-O3 ` in combination with :option: `-ffast-math ` should be used
434+ instead if the request for non-standard math behavior is intended. Thus, as
435+ there is no timeline yet for removal, the aim is to discourage its usage
436+ due to the compliance violating optimizations.
434437
435438 :option: `-Os ` Like :option: `-O2 ` with extra optimizations to reduce code
436439 size.
Original file line number Diff line number Diff line change @@ -495,10 +495,12 @@ New Compiler Flags
495495Deprecated Compiler Flags
496496-------------------------
497497
498- - The ``-Ofast `` command-line option has been deprecated. This option both
499- enables the ``-O3 `` optimization-level, as well as enabling non-standard
500- ``-ffast-math `` behaviors. As such, it is somewhat misleading as an
501- "optimization level". Users are advised to switch to ``-O3 -ffast-math `` if
498+ - The ``-Ofast `` command-line option has been deprecated, but there is no
499+ timeline for removal yet. Thus, the main effect of emitting a deprecation
500+ warning message is to discourage its usage due to the problems of ``-Ofast ``:
501+ it enables both the ``-O3 `` optimization-level as well as non-standard
502+ ``-ffast-math `` behaviors and as such it is perceived to be misleading as an
503+ optimization level. Users are advised to switch to ``-O3 -ffast-math `` if
502504 the use of non-standard math behavior is intended, and ``-O3 `` otherwise.
503505 See `RFC <https://discourse.llvm.org/t/rfc-deprecate-ofast/78687 >`_ for details.
504506
You can’t perform that action at this time.
0 commit comments