OSDN Git Service

2000-07-13 Alexandre Petit-Bianco <apbianco@cygnus.com>
authorapbianco <apbianco@138bc75d-0d04-0410-961f-82ee72b054a4>
Thu, 13 Jul 2000 19:27:49 +0000 (19:27 +0000)
committerapbianco <apbianco@138bc75d-0d04-0410-961f-82ee72b054a4>
Thu, 13 Jul 2000 19:27:49 +0000 (19:27 +0000)
* parse.y (fold_constant_for_init): Avoid bullish conversion.

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

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@35022 138bc75d-0d04-0410-961f-82ee72b054a4

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

index 4857d01..b341bba 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 5133edf..f1cd122 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 f062016..c13eb4b 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: