Skip to content

Commit 9ac3941

Browse files
sjoerdmeijerAaronBallman
authored andcommitted
Ofast deprecation clarifications (llvm#101005)
Following up on the RFC discussion, this is clarifying that the main purpose and effect of the -Ofast deprecation is to discourage its usage and that everything else is more or less open for discussion, e.g. there is no timeline yet for removal. --------- Co-authored-by: Aaron Ballman <[email protected]> (cherry picked from commit 48d4d4b)
1 parent 18ad020 commit 9ac3941

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

clang/docs/CommandGuide/clang.rst

+6-2
Original file line numberDiff line numberDiff line change
@@ -429,8 +429,12 @@ 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. There
435+
is no timeline yet for removal; the aim is to discourage use of
436+
:option:`-Ofast` due to the surprising behavior of an optimization flag
437+
changing the observable behavior of correct code.
434438

435439
:option:`-Os` Like :option:`-O2` with extra optimizations to reduce code
436440
size.

0 commit comments

Comments
 (0)