From c19a80671bf41d73c9f35212b845d8c55681c903 Mon Sep 17 00:00:00 2001 From: Jason Merrill Date: Wed, 17 May 1995 23:34:39 +0000 Subject: [PATCH] 72nd Cygnus<->FSF merge From-SVN: r9737 --- gcc/cp/ChangeLog | 9 +++++++++ gcc/cp/class.c | 3 +++ gcc/cp/expr.c | 1 + 3 files changed, 13 insertions(+) diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index b40acc3d36e..e8bc6e22282 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,3 +1,12 @@ +Wed May 17 01:43:58 1995 Jason Merrill + + * class.c (finish_struct): Don't complain about a class with no + user-defined constructors but with a member that has no default + constructor, as this is OK for aggregates. + + * expr.c (cplus_expand_expr, NEW_EXPR): If this is an explicit + constructor call, mark slot addressable. + Tue May 16 18:37:51 1995 Douglas Rupp (drupp@cs.washington.edu) * g++.c: Changed WINNT to _WIN32. diff --git a/gcc/cp/class.c b/gcc/cp/class.c index 7463058e760..a1a1fa8c434 100644 --- a/gcc/cp/class.c +++ b/gcc/cp/class.c @@ -3287,6 +3287,8 @@ finish_struct (t, list_of_fieldlists, warn_anon) && ! TYPE_HAS_DEFAULT_CONSTRUCTOR (type)) { cant_have_default_ctor = 1; +#if 0 + /* This is wrong for aggregates. */ if (! TYPE_HAS_CONSTRUCTOR (t)) { if (DECL_NAME (x)) @@ -3296,6 +3298,7 @@ finish_struct (t, list_of_fieldlists, warn_anon) cp_pedwarn_at ("in class without a constructor", x); } +#endif } } if (DECL_INITIAL (x) != NULL_TREE) diff --git a/gcc/cp/expr.c b/gcc/cp/expr.c index c722dcbe6e0..27da793b1a7 100644 --- a/gcc/cp/expr.c +++ b/gcc/cp/expr.c @@ -107,6 +107,7 @@ cplus_expand_expr (exp, target, tmode, modifier) type = TYPE_POINTER_TO (type); /* Don't clobber a value that might be part of a default parameter value. */ + mark_addressable (slot); if (TREE_PERMANENT (args)) args = tree_cons (0, build1 (ADDR_EXPR, type, slot), TREE_CHAIN (args)); -- 2.30.2