(convert_to_pointer): Eliminate ref to null_pointer_node.
authorRichard Kenner <kenner@gcc.gnu.org>
Sun, 25 Dec 1994 12:22:24 +0000 (07:22 -0500)
committerRichard Kenner <kenner@gcc.gnu.org>
Sun, 25 Dec 1994 12:22:24 +0000 (07:22 -0500)
From-SVN: r8691

gcc/convert.c

index 2cb5990e732627341defc239978fa7de99c86c7c..38a714f2043198a83bf95c3b64e4930ed690f1f7 100644 (file)
@@ -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.