typeck.c: Use fold_convert for ints and booleans.

2004-12-20  Andrew Haley  <aph@redhat.com>

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

From-SVN: r92419
This commit is contained in:
Andrew Haley 2004-12-20 13:35:25 +00:00 committed by Andrew Haley
parent 094a624bbd
commit 521fce5217
2 changed files with 5 additions and 1 deletions

View 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

View 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)