summaryrefslogtreecommitdiff
path: root/gcc/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/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/convert.c')
-rw-r--r--gcc/convert.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/gcc/convert.c b/gcc/convert.c
index 706dc41985c..a1ac3300cac 100644
--- a/gcc/convert.c
+++ b/gcc/convert.c
@@ -42,6 +42,7 @@ along with GCC; see the file COPYING3. If not see
tree
convert_to_pointer (tree type, tree expr)
{
+ location_t loc = EXPR_LOCATION (expr);
if (TREE_TYPE (expr) == type)
return expr;
@@ -53,16 +54,16 @@ convert_to_pointer (tree type, tree expr)
{
case POINTER_TYPE:
case REFERENCE_TYPE:
- return fold_build1 (NOP_EXPR, type, expr);
+ return fold_build1_loc (loc, NOP_EXPR, type, expr);
case INTEGER_TYPE:
case ENUMERAL_TYPE:
case BOOLEAN_TYPE:
if (TYPE_PRECISION (TREE_TYPE (expr)) != POINTER_SIZE)
- expr = fold_build1 (NOP_EXPR,
+ expr = fold_build1_loc (loc, NOP_EXPR,
lang_hooks.types.type_for_size (POINTER_SIZE, 0),
expr);
- return fold_build1 (CONVERT_EXPR, type, expr);
+ return fold_build1_loc (loc, CONVERT_EXPR, type, expr);
default: