Mercurial > hg > CbC > CbC_gcc
comparison 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 |
comparison
equal
deleted
inserted
replaced
18:33936f7f2835 | 19:58ad6c70ea60 |
---|---|
738 If truncating after extending, we may get rid of wasted work. */ | 738 If truncating after extending, we may get rid of wasted work. */ |
739 return convert (type, get_unwidened (TREE_OPERAND (expr, 0), type)); | 739 return convert (type, get_unwidened (TREE_OPERAND (expr, 0), type)); |
740 | 740 |
741 case COND_EXPR: | 741 case COND_EXPR: |
742 /* It is sometimes worthwhile to push the narrowing down through | 742 /* It is sometimes worthwhile to push the narrowing down through |
743 the conditional and never loses. */ | 743 the conditional and never loses. A COND_EXPR may have a throw |
744 as one operand, which then has void type. Just leave void | |
745 operands as they are. */ | |
744 return fold_build3 (COND_EXPR, type, TREE_OPERAND (expr, 0), | 746 return fold_build3 (COND_EXPR, type, TREE_OPERAND (expr, 0), |
745 convert (type, TREE_OPERAND (expr, 1)), | 747 VOID_TYPE_P (TREE_TYPE (TREE_OPERAND (expr, 1))) |
746 convert (type, TREE_OPERAND (expr, 2))); | 748 ? TREE_OPERAND (expr, 1) |
749 : convert (type, TREE_OPERAND (expr, 1)), | |
750 VOID_TYPE_P (TREE_TYPE (TREE_OPERAND (expr, 2))) | |
751 ? TREE_OPERAND (expr, 2) | |
752 : convert (type, TREE_OPERAND (expr, 2))); | |
747 | 753 |
748 default: | 754 default: |
749 break; | 755 break; |
750 } | 756 } |
751 | 757 |