summaryrefslogtreecommitdiff
path: root/gcc/tree.c
diff options
context:
space:
mode:
authorZack Weinberg <zack@gcc.gnu.org>2002-03-25 20:52:28 +0000
committerZack Weinberg <zack@gcc.gnu.org>2002-03-25 20:52:28 +0000
commit15e5ad7698ca582197d816b0e864d55bc0bdb607 (patch)
tree8c35b0cf468101ecc396f5eb7631e99dc328e79c /gcc/tree.c
parent99ffa1e37aad3fafd771f47b56c0085ce5544727 (diff)
downloadgcc-15e5ad7698ca582197d816b0e864d55bc0bdb607.tar.gz
toplev.c: Don't include setjmp.h.
* toplev.c: Don't include setjmp.h. Kill float_handler_set, float_handled, float_handler, float_signal, set_float_handler, and do_float_handler. Set handler for SIGFPE to crash_signal. * toplev.h: Don't prototype do_float_handler. * c-lex.c: Fold parse_float into lex_number. Make warning about portability of hex float constants more informative, and don't issue it on top of a syntax error. * fold-const.c: Fold const_binop_1 and fold_convert_1 into their callers. * real.h: Define REAL_VALUE_ABS here... * simplify-rtx.c: ... not here. Fold check_fold_consts, simplify_unary_real, simplify_binary_real, and simplify_binary_is2orm1 into their callers. * tree.c: Fold build_real_from_int_cst_1 into caller. * doc/tm.texi: Document REAL_VALUE_ABS and REAL_VALUE_NEGATIVE. * tsystem.h: Include float.h here... * libgcc2.c: ... not here. java: * lex.c: Change java_perform_atof to take normal parameters instead of a pointer to a parameter block. Call it directly from java_lex. testsuite: * gcc.dg/c90-hexfloat-1.c: Adjust error regexps. From-SVN: r51336
Diffstat (limited to 'gcc/tree.c')
-rw-r--r--gcc/tree.c42
1 files changed, 2 insertions, 40 deletions
diff --git a/gcc/tree.c b/gcc/tree.c
index eda2fd63aeb..96a2d3b7160 100644
--- a/gcc/tree.c
+++ b/gcc/tree.c
@@ -122,7 +122,6 @@ struct type_hash
htab_t type_hash_table;
-static void build_real_from_int_cst_1 PARAMS ((PTR));
static void set_type_quals PARAMS ((tree, int));
static void append_random_chars PARAMS ((char *));
static int type_hash_eq PARAMS ((const void*, const void*));
@@ -591,31 +590,8 @@ real_value_from_int_cst (type, i)
return d;
}
-/* Args to pass to and from build_real_from_int_cst_1. */
-
-struct brfic_args
-{
- tree type; /* Input: type to conver to. */
- tree i; /* Input: operand to convert. */
- REAL_VALUE_TYPE d; /* Output: floating point value. */
-};
-
-/* Convert an integer to a floating point value while protected by a floating
- point exception handler. */
-
-static void
-build_real_from_int_cst_1 (data)
- PTR data;
-{
- struct brfic_args *args = (struct brfic_args *) data;
-
- args->d = real_value_from_int_cst (args->type, args->i);
-}
-
/* Given a tree representing an integer constant I, return a tree
- representing the same value as a floating-point constant of type TYPE.
- We cannot perform this operation if there is no way of doing arithmetic
- on floating-point values. */
+ representing the same value as a floating-point constant of type TYPE. */
tree
build_real_from_int_cst (type, i)
@@ -625,27 +601,13 @@ build_real_from_int_cst (type, i)
tree v;
int overflow = TREE_OVERFLOW (i);
REAL_VALUE_TYPE d;
- struct brfic_args args;
v = make_node (REAL_CST);
TREE_TYPE (v) = type;
- /* Setup input for build_real_from_int_cst_1() */
- args.type = type;
- args.i = i;
-
- if (do_float_handler (build_real_from_int_cst_1, (PTR) &args))
- /* Receive output from build_real_from_int_cst_1() */
- d = args.d;
- else
- {
- /* We got an exception from build_real_from_int_cst_1() */
- d = dconst0;
- overflow = 1;
- }
+ d = real_value_from_int_cst (type, i);
/* Check for valid float value for this type on this target machine. */
-
#ifdef CHECK_FLOAT_VALUE
CHECK_FLOAT_VALUE (TYPE_MODE (type), d, overflow);
#endif