aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorRichard Kenner <kenner@gcc.gnu.org>1994-04-25 06:33:38 -0400
committerRichard Kenner <kenner@gcc.gnu.org>1994-04-25 06:33:38 -0400
commit4b8a006289d16cd333d25cdc2a16d52086a531b5 (patch)
tree3ee8f806dcd3b756680b90f0162d35b7db7e87b2 /gcc
parent4791d99b588f73e575285806f6a2ba967a7df419 (diff)
downloadgcc-4b8a006289d16cd333d25cdc2a16d52086a531b5.zip
gcc-4b8a006289d16cd333d25cdc2a16d52086a531b5.tar.gz
gcc-4b8a006289d16cd333d25cdc2a16d52086a531b5.tar.bz2
(fold-convert): Use assignment, instead of initializing, aggregate
local variable REAL_VALUE_TYPE. From-SVN: r7146
Diffstat (limited to 'gcc')
-rw-r--r--gcc/fold-const.c13
1 files changed, 9 insertions, 4 deletions
diff --git a/gcc/fold-const.c b/gcc/fold-const.c
index 9fa976b9..c3f2c5c 100644
--- a/gcc/fold-const.c
+++ b/gcc/fold-const.c
@@ -1584,10 +1584,15 @@ fold_convert (t, arg1)
#if !defined (REAL_IS_NOT_DOUBLE) || defined (REAL_ARITHMETIC)
else if (TREE_CODE (arg1) == REAL_CST)
{
- REAL_VALUE_TYPE x = TREE_REAL_CST (arg1);
- REAL_VALUE_TYPE l = real_value_from_int_cst (TYPE_MIN_VALUE (type));
- REAL_VALUE_TYPE u = real_value_from_int_cst (TYPE_MAX_VALUE (type));
-
+ /* Don't initialize these, use assignments.
+ Initialized local aggregates don't work on old compilers. */
+ REAL_VALUE_TYPE x;
+ REAL_VALUE_TYPE l;
+ REAL_VALUE_TYPE u;
+
+ x = TREE_REAL_CST (arg1);
+ l = real_value_from_int_cst (TYPE_MIN_VALUE (type));
+ u = real_value_from_int_cst (TYPE_MAX_VALUE (type));
/* See if X will be in range after truncation towards 0.
To compensate for truncation, move the bounds away from 0,
but reject if X exactly equals the adjusted bounds. */