summaryrefslogtreecommitdiff
path: root/gcc/convert.c
diff options
context:
space:
mode:
authorkenner <kenner@138bc75d-0d04-0410-961f-82ee72b054a4>1994-12-25 12:22:24 +0000
committerkenner <kenner@138bc75d-0d04-0410-961f-82ee72b054a4>1994-12-25 12:22:24 +0000
commit7b53e43db5ee26a026e57646a11198bc8cd2cfb5 (patch)
tree1df9240a75944b443cf859ad86b3020ba4b9b515 /gcc/convert.c
parentf49e52a6a08efdd3c12d377f30f0a587caab3e74 (diff)
downloadgcc-7b53e43db5ee26a026e57646a11198bc8cd2cfb5.tar.gz
(convert_to_pointer): Eliminate ref to null_pointer_node.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@8691 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/convert.c')
-rw-r--r--gcc/convert.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/gcc/convert.c b/gcc/convert.c
index 2cb5990e732..38a714f2043 100644
--- a/gcc/convert.c
+++ b/gcc/convert.c
@@ -40,8 +40,6 @@ convert_to_pointer (type, expr)
if (integer_zerop (expr))
{
- if (type == TREE_TYPE (null_pointer_node))
- return null_pointer_node;
expr = build_int_2 (0, 0);
TREE_TYPE (expr) = type;
return expr;
@@ -67,7 +65,9 @@ convert_to_pointer (type, expr)
error ("cannot convert to a pointer type");
- return null_pointer_node;
+ expr = build_int_2 (0, 0);
+ TREE_TYPE (expr) = type;
+ return expr;
}
/* Convert EXPR to some floating-point type TYPE.