Mercurial > hg > CbC > CbC_gcc
diff gcc/convert.c @ 19:58ad6c70ea60
update gcc from 4.4.0 to 4.4.1.
author | kent@firefly.cr.ie.u-ryukyu.ac.jp |
---|---|
date | Thu, 24 Sep 2009 13:21:57 +0900 |
parents | a06113de4d67 |
children | 77e2b8dfacca |
line wrap: on
line diff
--- a/gcc/convert.c Thu Sep 24 13:06:16 2009 +0900 +++ b/gcc/convert.c Thu Sep 24 13:21:57 2009 +0900 @@ -740,10 +740,16 @@ case COND_EXPR: /* It is sometimes worthwhile to push the narrowing down through - the conditional and never loses. */ + the conditional and never loses. A COND_EXPR may have a throw + as one operand, which then has void type. Just leave void + operands as they are. */ return fold_build3 (COND_EXPR, type, TREE_OPERAND (expr, 0), - convert (type, TREE_OPERAND (expr, 1)), - convert (type, TREE_OPERAND (expr, 2))); + VOID_TYPE_P (TREE_TYPE (TREE_OPERAND (expr, 1))) + ? TREE_OPERAND (expr, 1) + : convert (type, TREE_OPERAND (expr, 1)), + VOID_TYPE_P (TREE_TYPE (TREE_OPERAND (expr, 2))) + ? TREE_OPERAND (expr, 2) + : convert (type, TREE_OPERAND (expr, 2))); default: break;