typeck.c: Use fold_convert for ints and booleans.
authorAndrew Haley <aph@redhat.com>
Mon, 20 Dec 2004 13:35:25 +0000 (13:35 +0000)
committerAndrew Haley <aph@gcc.gnu.org>
Mon, 20 Dec 2004 13:35:25 +0000 (13:35 +0000)
2004-12-20  Andrew Haley  <aph@redhat.com>

        * typeck.c: Use fold_convert for ints and booleans.

From-SVN: r92419

gcc/java/ChangeLog
gcc/java/typeck.c

index fba183309451c677627abae547e760cd2a4db4ea..61f0a6fdf8de65d37f45826b4276745f2aedd772 100644 (file)
@@ -1,3 +1,7 @@
+2004-12-20  Andrew Haley  <aph@redhat.com>
+
+       * typeck.c: Use fold_convert for ints and booleans.
+
 2004-12-17  Andrew Haley  <aph@redhat.com>
 
        PR java/18931
index 2b85e475d95bdbb384497dc86f20de5b4ffc89f8..dcd201de777c36301e9d2d83aeea16e7e6498661 100644 (file)
@@ -130,7 +130,7 @@ convert (tree type, tree expr)
   if (code == VOID_TYPE)
     return build1 (CONVERT_EXPR, type, expr);
   if (code == BOOLEAN_TYPE || code ==  CHAR_TYPE)
-    return fold (build1 (CONVERT_EXPR, type, expr));
+    return fold_convert (type, expr);
   if (code == INTEGER_TYPE)
     {
       if ((really_constant_p (expr)