summaryrefslogtreecommitdiff
path: root/gcc/flags.h
diff options
context:
space:
mode:
authortoon <toon@138bc75d-0d04-0410-961f-82ee72b054a4>2002-07-30 22:23:26 +0000
committertoon <toon@138bc75d-0d04-0410-961f-82ee72b054a4>2002-07-30 22:23:26 +0000
commit7eece8c3c9ac71e657645258b0c8ad99699df1ed (patch)
treede115f5445a03103a3fc5ea6fddfa87706ee7d4e /gcc/flags.h
parent95c02608654896d12cb97aaae32fb52183b263c9 (diff)
downloadgcc-7eece8c3c9ac71e657645258b0c8ad99699df1ed.tar.gz
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. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@55887 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/flags.h')
-rw-r--r--gcc/flags.h8
1 files changed, 6 insertions, 2 deletions
diff --git a/gcc/flags.h b/gcc/flags.h
index 06ebd20a59d..4ff7fcf4abf 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. */