OSDN Git Service

* call.c (build_over_call): Tweak empty class handling.
authorjason <jason@138bc75d-0d04-0410-961f-82ee72b054a4>
Mon, 18 May 1998 04:28:54 +0000 (04:28 +0000)
committerjason <jason@138bc75d-0d04-0410-961f-82ee72b054a4>
Mon, 18 May 1998 04:28:54 +0000 (04:28 +0000)
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@19833 138bc75d-0d04-0410-961f-82ee72b054a4

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

index 6bbfcbf..ef93701 100644 (file)
@@ -1,5 +1,7 @@
 Mon May 18 03:00:57 1998  Jason Merrill  <jason@yorick.cygnus.com>
 
+       * call.c (build_over_call): Tweak empty class handling.
+
        * decl.c (make_typename_type): Use currently_open_class.
 
        * class.c (instantiate_type): Don't abort on TREE_NONLOCAL_FLAG.
index b9df085..82397a6 100644 (file)
@@ -3394,8 +3394,10 @@ build_over_call (cand, args, flags)
          /* Don't copy the padding byte; it might not have been allocated
             if to is a base subobject.  */
          if (is_empty_class (DECL_CLASS_CONTEXT (fn)))
-           return build (COMPOUND_EXPR, TREE_TYPE (to),
-                         cp_convert (void_type_node, arg), to);
+           return build_unary_op
+             (ADDR_EXPR, build (COMPOUND_EXPR, TREE_TYPE (to),
+                                cp_convert (void_type_node, arg), to),
+              0);
 
          val = build (INIT_EXPR, DECL_CONTEXT (fn), to, arg);
          TREE_SIDE_EFFECTS (val) = 1;