summaryrefslogtreecommitdiff
path: root/gcc/c-convert.c
diff options
context:
space:
mode:
authorbstarynk <bstarynk@138bc75d-0d04-0410-961f-82ee72b054a4>2009-07-20 05:35:17 +0000
committerbstarynk <bstarynk@138bc75d-0d04-0410-961f-82ee72b054a4>2009-07-20 05:35:17 +0000
commit6b351cc8c497c4ed9d296b55b424341f20b56f92 (patch)
tree8bcbc6cc30a2f9d6253007a662393cfed258713a /gcc/c-convert.c
parentd0df232358778b869142e628e5e736fc7515f5ab (diff)
downloadgcc-6b351cc8c497c4ed9d296b55b424341f20b56f92.tar.gz
2009-07-20 Basile Starynkevitch <basile@starynkevitch.net>
MELT branch merged with trunk rev 149800 git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/melt-branch@149801 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/c-convert.c')
-rw-r--r--gcc/c-convert.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/gcc/c-convert.c b/gcc/c-convert.c
index 5349d7a77e8..09638d5b151 100644
--- a/gcc/c-convert.c
+++ b/gcc/c-convert.c
@@ -71,6 +71,7 @@ convert (tree type, tree expr)
enum tree_code code = TREE_CODE (type);
const char *invalid_conv_diag;
tree ret;
+ location_t loc = EXPR_LOCATION (expr);
if (type == error_mark_node
|| expr == error_mark_node
@@ -93,7 +94,7 @@ convert (tree type, tree expr)
STRIP_TYPE_NOPS (e);
if (TYPE_MAIN_VARIANT (type) == TYPE_MAIN_VARIANT (TREE_TYPE (expr)))
- return fold_convert (type, expr);
+ return fold_convert_loc (loc, type, expr);
if (TREE_CODE (TREE_TYPE (expr)) == ERROR_MARK)
return error_mark_node;
if (TREE_CODE (TREE_TYPE (expr)) == VOID_TYPE)
@@ -105,7 +106,7 @@ convert (tree type, tree expr)
switch (code)
{
case VOID_TYPE:
- return fold_convert (type, e);
+ return fold_convert_loc (loc, type, e);
case INTEGER_TYPE:
case ENUMERAL_TYPE:
@@ -113,8 +114,8 @@ convert (tree type, tree expr)
goto maybe_fold;
case BOOLEAN_TYPE:
- return fold_convert
- (type, c_objc_common_truthvalue_conversion (input_location, expr));
+ return fold_convert_loc
+ (loc, type, c_objc_common_truthvalue_conversion (input_location, expr));
case POINTER_TYPE:
case REFERENCE_TYPE: