]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
cvt.c (cp_convert_to_pointer): Call force_fit_type for null pointers.
authorJason Merrill <jason@redhat.com>
Fri, 5 Jul 2002 22:11:38 +0000 (18:11 -0400)
committerJason Merrill <jason@gcc.gnu.org>
Fri, 5 Jul 2002 22:11:38 +0000 (18:11 -0400)
        * cvt.c (cp_convert_to_pointer): Call force_fit_type for null
        pointers.

From-SVN: r55273

gcc/cp/ChangeLog
gcc/cp/cvt.c

index f4909b06b14aae035f435ae19525a6dd96a1754d..2390b14fcac08ff14326b2370a942bd291cdba4c 100644 (file)
@@ -5,6 +5,9 @@
 
 2002-07-05  Jason Merrill  <jason@redhat.com>
 
+       * cvt.c (cp_convert_to_pointer): Call force_fit_type for null
+       pointers.
+
        PR optimization/7145
        * tree.c (cp_copy_res_decl_for_inlining): Also copy DECL_INITIAL.
 
index 25c05dcf3ef25b986e686d757917112b8ac236e9..9b4f68f2fa1136ba71a5e044e231abe7d7e650df 100644 (file)
@@ -249,6 +249,8 @@ cp_convert_to_pointer (type, expr, force)
       else
        expr = build_int_2 (0, 0);
       TREE_TYPE (expr) = type;
+      /* Fix up the representation of -1 if appropriate.  */
+      force_fit_type (expr, 0);
       return expr;
     }