Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ofast deprecation clarifications #101005

Merged
merged 3 commits into from
Aug 2, 2024
Merged
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions clang/docs/CommandGuide/clang.rst
Original file line number Diff line number Diff line change
Expand Up @@ -429,8 +429,12 @@ Code Generation Options

:option:`-Ofast` Enables all the optimizations from :option:`-O3` along
with other aggressive optimizations that may violate strict compliance with
language standards. This is deprecated in favor of :option:`-O3`
in combination with :option:`-ffast-math`.
language standards. This is deprecated in Clang 19 and a warning is emitted
that :option:`-O3` in combination with :option:`-ffast-math` should be used
instead if the request for non-standard math behavior is intended. There
sjoerdmeijer marked this conversation as resolved.
Show resolved Hide resolved
is no timeline yet for removal; the aim is to discourage use of
:option:`-Ofast` due to the surprising behavior of an optimization flag
changing the observable behavior of correct code.

:option:`-Os` Like :option:`-O2` with extra optimizations to reduce code
size.
Expand Down
Loading