aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJason Merrill <jason@yorick.cygnus.com>1998-05-18 04:28:54 +0000
committerJason Merrill <jason@gcc.gnu.org>1998-05-18 00:28:54 -0400
commitbe1559e5b540d31671ce571835299b4bfef28a03 (patch)
tree37d13fbe531d22c658bfacccabf53eba4f0ed539
parentb77ead33d324dd197b1d244be715044ed234d390 (diff)
downloadgcc-be1559e5b540d31671ce571835299b4bfef28a03.zip
gcc-be1559e5b540d31671ce571835299b4bfef28a03.tar.gz
gcc-be1559e5b540d31671ce571835299b4bfef28a03.tar.bz2
* call.c (build_over_call): Tweak empty class handling.
From-SVN: r19833
-rw-r--r--gcc/cp/ChangeLog2
-rw-r--r--gcc/cp/call.c6
2 files changed, 6 insertions, 2 deletions
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog
index 6bbfcbf..ef93701 100644
--- a/gcc/cp/ChangeLog
+++ b/gcc/cp/ChangeLog
@@ -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.
diff --git a/gcc/cp/call.c b/gcc/cp/call.c
index b9df085..82397a6 100644
--- a/gcc/cp/call.c
+++ b/gcc/cp/call.c
@@ -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;