72nd Cygnus<->FSF merge

From-SVN: r9737
This commit is contained in:
Jason Merrill 1995-05-17 23:34:39 +00:00 committed by Mike Stump
parent 01e7bd9ad2
commit c19a80671b
3 changed files with 13 additions and 0 deletions

View File

@ -1,3 +1,12 @@
Wed May 17 01:43:58 1995 Jason Merrill <jason@phydeaux.cygnus.com>
* 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.

View File

@ -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)

View File

@ -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));