parse.y (fold_constant_for_init): Avoid bullish conversion.
authorAlexandre Petit-Bianco <apbianco@cygnus.com>
Thu, 13 Jul 2000 19:27:49 +0000 (19:27 +0000)
committerAlexandre Petit-Bianco <apbianco@gcc.gnu.org>
Thu, 13 Jul 2000 19:27:49 +0000 (12:27 -0700)
2000-07-13  Alexandre Petit-Bianco  <apbianco@cygnus.com>

* parse.y (fold_constant_for_init): Avoid bullish conversion.

(http://gcc.gnu.org/ml/gcc-patches/2000-07/msg00506.html)

From-SVN: r35022

gcc/java/ChangeLog
gcc/java/parse.c
gcc/java/parse.y

index 4857d0182195988dcfd039bc71f28219aca13698..b341bbaaa66c9aeef1072e7358d9fd419e97bdfd 100644 (file)
@@ -1,3 +1,7 @@
+2000-07-13  Alexandre Petit-Bianco  <apbianco@cygnus.com>
+
+       * parse.y (fold_constant_for_init): Avoid bullish conversion.
+
 2000-07-13  Tom Tromey  <tromey@cygnus.com>
 
        * lang-specs.h: Added %{I*}.
index 5133edfc0d7062366f3e28cba59fe88fbab6b6c7..f1cd122cc8ec3130162fc79f64825d90e54249ea 100644 (file)
@@ -17508,12 +17508,9 @@ fold_constant_for_init (node, context)
   tree op0, op1, val;
   enum tree_code code = TREE_CODE (node);
 
-  if (code == STRING_CST)
+  if (code == STRING_CST || code == INTEGER_CST || code == REAL_CST)
     return node;
 
-  if (code == INTEGER_CST || code == REAL_CST)
-    return convert (TREE_TYPE (context), node);
-
   switch (code)
     {
     case PLUS_EXPR:
index f062016ee6b02df0a2baa2b052dc0648b2256b75..c13eb4bc350f75b4792cf0b3831160dfd88d235b 100644 (file)
@@ -14810,12 +14810,9 @@ fold_constant_for_init (node, context)
   tree op0, op1, val;
   enum tree_code code = TREE_CODE (node);
 
-  if (code == STRING_CST)
+  if (code == STRING_CST || code == INTEGER_CST || code == REAL_CST)
     return node;
 
-  if (code == INTEGER_CST || code == REAL_CST)
-    return convert (TREE_TYPE (context), node);
-
   switch (code)
     {
     case PLUS_EXPR: