aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--gcc/cp/ChangeLog3
-rw-r--r--gcc/cp/expr.c10
2 files changed, 9 insertions, 4 deletions
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog
index 6fd6754..9bed584 100644
--- a/gcc/cp/ChangeLog
+++ b/gcc/cp/ChangeLog
@@ -1,5 +1,8 @@
Wed Mar 25 02:01:02 1998 Jason Merrill <jason@yorick.cygnus.com>
+ * expr.c (cplus_expand_expr): Only do PCC_STATIC_STRUCT_RETURN thing
+ if (aggregate_value_p (type)).
+
* decl2.c (constructor_name_full): Handle TYPENAME_TYPE.
Tue Mar 24 16:12:01 1998 Mark Mitchell <mmitchell@usa.net>
diff --git a/gcc/cp/expr.c b/gcc/cp/expr.c
index aa229d4..50159cd 100644
--- a/gcc/cp/expr.c
+++ b/gcc/cp/expr.c
@@ -114,11 +114,13 @@ cplus_expand_expr (exp, target, tmode, modifier)
}
else
{
-#ifdef PCC_STATIC_STRUCT_RETURN
- pcc_struct_return = 1;
- call_target = 0;
-#else
call_target = target;
+#ifdef PCC_STATIC_STRUCT_RETURN
+ if (aggregate_value_p (type))
+ {
+ pcc_struct_return = 1;
+ call_target = 0;
+ }
#endif
}