diff options
author | Toon Moene <toon@moene.indiv.nluug.nl> | 2002-07-31 00:23:26 +0200 |
---|---|---|
committer | Toon Moene <toon@gcc.gnu.org> | 2002-07-30 22:23:26 +0000 |
commit | 2e8f2e8f7dac642b0b369c7f71d6852278d5c2a5 (patch) | |
tree | de115f5445a03103a3fc5ea6fddfa87706ee7d4e /gcc/flags.h | |
parent | a538e5805514bc4728c76b372cf4dc89edd4d968 (diff) | |
download | gcc-2e8f2e8f7dac642b0b369c7f71d6852278d5c2a5.zip gcc-2e8f2e8f7dac642b0b369c7f71d6852278d5c2a5.tar.gz gcc-2e8f2e8f7dac642b0b369c7f71d6852278d5c2a5.tar.bz2 |
flags.h: Declare flag_finite_math_only.
2002-07-30 Toon Moene <toon@moene.indiv.nluug.nl>
* flags.h: Declare flag_finite_math_only.
Use it in definition of HONOR_NANS and
HONOR_INFINITIES.
* c-common.c (cb_register_builtins): Emit
__FINITE_MATH_ONLY__ when flag_finite_math_only
is set.
* combine.c (simplify_if_then_else): If
flag_finite_math_only is set, a == b has a
definite value.
* toplev.c: Initialize flag_finite_math_only.
(set_flags_fast_math): Set it on -ffast-math.
(flag_fast_math_set_p): Test it.
doc:
* invoke.texi: Document -ffinite-math-only.
f:
* com.c (ffe_init_options): Set
flag_finite_math_only.
* invoke.texi: Document -fno-finite-math-only.
From-SVN: r55887
Diffstat (limited to 'gcc/flags.h')
-rw-r--r-- | gcc/flags.h | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/gcc/flags.h b/gcc/flags.h index 06ebd20..4ff7fcf 100644 --- a/gcc/flags.h +++ b/gcc/flags.h @@ -359,6 +359,10 @@ extern int flag_errno_math; extern int flag_unsafe_math_optimizations; +/* Nonzero means that no NaNs or +-Infs are expected. */ + +extern int flag_finite_math_only; + /* Zero means that floating-point math operations cannot generate a (user-visible) trap. This is the case, for example, in nonstop IEEE 754 arithmetic. */ @@ -672,7 +676,7 @@ extern int flag_signaling_nans; disabled for modes with NaNs. The user can ask for them to be done anyway using the -funsafe-math-optimizations switch. */ #define HONOR_NANS(MODE) \ - (MODE_HAS_NANS (MODE) && !flag_unsafe_math_optimizations) + (MODE_HAS_NANS (MODE) && !flag_finite_math_only) /* Like HONOR_NANs, but true if we honor signaling NaNs (or sNaNs). */ #define HONOR_SNANS(MODE) (flag_signaling_nans && HONOR_NANS (MODE)) @@ -680,7 +684,7 @@ extern int flag_signaling_nans; /* As for HONOR_NANS, but true if the mode can represent infinity and the treatment of infinite values is important. */ #define HONOR_INFINITIES(MODE) \ - (MODE_HAS_INFINITIES (MODE) && !flag_unsafe_math_optimizations) + (MODE_HAS_INFINITIES (MODE) && !flag_finite_math_only) /* Like HONOR_NANS, but true if the given mode distinguishes between postive and negative zero, and the sign of zero is important. */ |