]> gcc.gnu.org Git - gcc.git/commitdiff
* call.c (standard_conversion): Handle A* -> const A* properly.
authorJason Merrill <jason@yorick.cygnus.com>
Thu, 19 Mar 1998 21:37:25 +0000 (21:37 +0000)
committerJason Merrill <jason@gcc.gnu.org>
Thu, 19 Mar 1998 21:37:25 +0000 (16:37 -0500)
From-SVN: r18718

gcc/cp/ChangeLog
gcc/cp/call.c

index a586432024cd5303bd66b31dd39604abad9c8639..b70bef15c746d2b865692a6c9e7014880f6acd2d 100644 (file)
@@ -1,5 +1,7 @@
 Thu Mar 19 11:51:58 1998  Jason Merrill  <jason@yorick.cygnus.com>
 
+       * call.c (standard_conversion): Handle A* -> const A* properly.
+
        * pt.c (get_bindings_real): Rename from get_bindings.  Add 
        check_rettype parm.
        (get_bindings): Pass 1.
index 16a6f9f0471aab73d864ef0e0bd2cbe571914b9b..c74d1f40faa1de452114c4dc24d54778312cb0d6 100644 (file)
@@ -782,8 +782,11 @@ standard_conversion (to, from, expr)
       enum tree_code ufcode = TREE_CODE (TREE_TYPE (from));
       enum tree_code utcode = TREE_CODE (TREE_TYPE (to));
 
-      if (utcode == VOID_TYPE && ufcode != OFFSET_TYPE
-         && ufcode != FUNCTION_TYPE)
+      if (comptypes (TYPE_MAIN_VARIANT (TREE_TYPE (from)),
+                    TYPE_MAIN_VARIANT (TREE_TYPE (to)), 1))
+       ;
+      else if (utcode == VOID_TYPE && ufcode != OFFSET_TYPE
+              && ufcode != FUNCTION_TYPE)
        {
          from = build_pointer_type
            (cp_build_type_variant (void_type_node,
This page took 0.083645 seconds and 5 git commands to generate.