* call.c (build_over_call): Tweak empty class handling.
authorJason Merrill <jason@yorick.cygnus.com>
Mon, 18 May 1998 04:28:54 +0000 (04:28 +0000)
committerJason Merrill <jason@gcc.gnu.org>
Mon, 18 May 1998 04:28:54 +0000 (00:28 -0400)
From-SVN: r19833

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

index 6bbfcbf0ceca128e17c791cbaaf667e3c247e13c..ef937012497558cb9100442a4fcde5171b8fff11 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 b9df085b07b0070b3da5592784253a127e2e8628..82397a607b7c0d772fd57d5d89d854edf3b59d6c 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;