aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorandreao <andreao@138bc75d-0d04-0410-961f-82ee72b054a4>2008-04-23 09:48:56 +0000
committerandreao <andreao@138bc75d-0d04-0410-961f-82ee72b054a4>2008-04-23 09:48:56 +0000
commita34de1e6fa8c9e6bc5af17ec2f27e34865d044a9 (patch)
tree429fb4198a4bfeff93762bed85eea4293cf58326
parent841e52a5bc81b9998f7088c4ddbefd48eda75676 (diff)
convert_to_integer: remove useless convertions,
to convert a pointer to its integer representation use NOP_EXPR with the unsigned integer of the correct size, instead of CONVERT_EXPR to signed integer (followed by a convertion to unsigned) git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/st/cli@134586 138bc75d-0d04-0410-961f-82ee72b054a4
-rw-r--r--gcc/convert.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/gcc/convert.c b/gcc/convert.c
index 97641cff051..bbb0db01178 100644
--- a/gcc/convert.c
+++ b/gcc/convert.c
@@ -450,8 +450,8 @@ convert_to_integer (tree type, tree expr)
/* Convert to an unsigned integer of the correct width first,
and from there widen/truncate to the required type. */
- expr = fold_build1 (CONVERT_EXPR,
- lang_hooks.types.type_for_size (POINTER_SIZE, 0),
+ expr = fold_build1 (NOP_EXPR,
+ lang_hooks.types.type_for_size (POINTER_SIZE, 1),
expr);
return fold_convert (type, expr);