summaryrefslogtreecommitdiff
path: root/clang/test/Parser/fp-floatcontrol-syntax.cpp
AgeCommit message (Collapse)Author
2022-10-14Remove redundant option -menable-unsafe-fp-math.Zahira Ammarguellat
There are currently two options that are used to tell the compiler to perform unsafe floating-point optimizations: '-ffast-math' and '-funsafe-math-optimizations'. '-ffast-math' is enabled by default. It automatically enables the driver option '-menable-unsafe-fp-math'. Below is a table illustrating the special operations enabled automatically by '-ffast-math', '-funsafe-math-optimizations' and '-menable-unsafe-fp-math' respectively. Special Operations -ffast-math -funsafe-math-optimizations -menable-unsafe-fp-math MathErrno 0 1 1 FiniteMathOnly 1 0 0 AllowFPReassoc 1 1 1 NoSignedZero 1 1 1 AllowRecip 1 1 1 ApproxFunc 1 1 1 RoundingMath 0 0 0 UnsafeFPMath 1 0 1 FPContract fast on on '-ffast-math' enables '-fno-math-errno', '-ffinite-math-only', '-funsafe-math-optimzations' and sets 'FpContract' to 'fast'. The driver option '-menable-unsafe-fp-math' enables the same special options than '-funsafe-math-optimizations'. This is redundant. We propose to remove the driver option '-menable-unsafe-fp-math' and use instead, the setting of the special operations to set the function attribute 'unsafe-fp-math'. This attribute will be enabled only if those special operations are enabled and if 'FPContract' is either 'fast' or set to the default value. Differential Revision: https://reviews.llvm.org/D135097
2021-07-28Allow #pragma float_control(push|pop) within a language linkage specificationAaron Ballman
Currently, we prohibit this pragma from appearing within a language linkage specification, but this is useful functionality that is supported by MSVC (which is where we inherited this feature from). This patch allows you to use the pragma within an extern "C" {} (etc) block.
2021-01-12[clang][cli] Remove -f[no-]trapping-math from -cc1 command lineJan Svoboda
This patch removes the -f[no-]trapping-math flags from the -cc1 command line. These flags are ignored in the command line parser and their semantics is fully handled by -ffp-exception-mode. This patch does not remove -f[no-]trapping-math from the driver command line. The driver flags are being used and do affect compilation. Reviewed By: dexonsmith, SjoerdMeijer Differential Revision: https://reviews.llvm.org/D93395
2020-10-25[clang] Enable support for #pragma STDC FENV_ACCESSMelanie Blower
Reviewers: rjmccall, rsmith, sepavloff Differential Revision: https://reviews.llvm.org/D87528
2020-05-12[PATCH] #pragma float_control should be permitted in namespace scope.Melanie Blower
Summary: Erroneous error diagnostic observed in VS2017 <numeric> header Also correction to propagate usesFPIntrin from template func to instantiation. Reviewers: rjmccall, erichkeane (no feedback received) Differential Revision: https://reviews.llvm.org/D79631
2020-05-06When pragma FENV_ACCESS is ignored do not modify Sema.CurFPFeaturesMelanie Blower
Bug reported by @uabelho against reviews.llvm.org/D72841 Reviewers: rjmccall Differential Revision: https://reviews.llvm.org/D79510
2020-05-04Reapply "Add support for #pragma float_control" with buildbot fixesMelanie Blower
Add support for #pragma float_control Reviewers: rjmccall, erichkeane, sepavloff Differential Revision: https://reviews.llvm.org/D72841 This reverts commit fce82c0ed310174fe48e2402ac731b6340098389.
2020-05-01Revert "Reapply "Add support for #pragma float_control" with improvements to"Melanie Blower
This reverts commit 69aacaf699922ffe0450f567e21208c10c84731f.
2020-05-01Reapply "Add support for #pragma float_control" with improvements toMelanie Blower
test cases Add support for #pragma float_control Reviewers: rjmccall, erichkeane, sepavloff Differential Revision: https://reviews.llvm.org/D72841 This reverts commit 85dc033caccaa6ab919d57f9759290be41240146, and makes corrections to the test cases that failed on buildbots.
2020-05-01Revert "Add support for #pragma float_control"Melanie Blower
This reverts commit 4f1e9a17e9d28bdfd035313c96b3a5d4c91a7733. due to fail on buildbot, sorry for the noise
2020-05-01Add support for #pragma float_controlMelanie Blower
Reviewers: rjmccall, erichkeane, sepavloff Differential Revision: https://reviews.llvm.org/D72841