+Thu Jul 3 01:44:05 1997 Jason Merrill <jason@yorick.cygnus.com>
+
+ * class.c (finish_struct_1): Only complain about pointers without
+ copy stuff if there are any constructors.
+
+ * rtti.c (build_dynamic_cast): Call complete_type on the types.
+
+ * decl.c (grokfndecl): If the function we chose doesn't actually
+ match, die.
+
+ * decl2.c (grokclassfn): Don't specify 'const int' for the
+ artificial destructor parm.
+
+ * pt.c (type_unification): If we are called recursively, nothing
+ decays.
+
+Mon Jun 30 17:53:21 1997 Geoffrey Noer <noer@cygnus.com>
+
+ * decl.c: Stop trying to catch signals other than SIGABRT
+ since the Cygwin32 library doesn't support them correctly
+ yet. This fixes a situation in which g++ causes a hang on
+ SIGSEGVs and other such signals in our Win32-hosted tools.
+
+Mon Jun 30 14:50:01 1997 Jason Merrill <jason@yorick.cygnus.com>
+
+ * tree.c (mapcar, case CALL_EXPR): Handle all the parse node data.
+
+Fri Jun 27 15:18:49 1997 Jason Merrill <jason@yorick.cygnus.com>
+
+ * typeck2.c (store_init_value): Always return the value if our
+ type needs constructing.
+
+ * method.c (hack_identifier): Convert class statics from
+ reference, too.
+
+Thu Jun 26 11:44:46 1997 Jason Merrill <jason@yorick.cygnus.com>
+
+ * Make-lang.in (cplib2.ready): Add $(LANGUAGES) dependency.
+
Thu Jun 19 16:49:28 1997 Mike Stump <mrs@cygnus.com>
* typeck.c (c_expand_return): Make sure we clean up temporaries at
}
/* Effective C++ rule 11. */
- if (has_pointers && warn_ecpp
+ if (has_pointers && warn_ecpp && TYPE_HAS_CONSTRUCTOR (t)
&& ! (TYPE_HAS_INIT_REF (t) && TYPE_HAS_ASSIGN_REF (t)))
{
cp_warning ("`%#T' has pointer data members", t);
around compiler bugs. */
signal (SIGSEGV, signal_catch);
+#ifndef __CYGWIN32__
/* We will also catch aborts in the back-end through signal_catch and
give the user a chance to see where the error might be, and to defeat
aborts in the back-end when there have been errors previously in their
#ifdef SIGBUS
signal (SIGBUS, signal_catch);
#endif
+#else /* ndef __CYGWIN32__ */
+ /* Cygwin32 cannot handle catching signals other than
+ SIGABRT yet. We hope this will cease to be the case soon. */
+#ifdef SIGABRT
+ signal (SIGABRT, signal_catch);
+#endif
+#endif /* ndef __CYGWIN32__ */
gcc_obstack_init (&decl_obstack);
}
if (tmp && DECL_ARTIFICIAL (tmp))
cp_error ("definition of implicitly-declared `%D'", tmp);
- if (tmp && duplicate_decls (decl, tmp))
- return tmp;
+ if (tmp)
+ {
+ if (!duplicate_decls (decl, tmp))
+ my_friendly_abort (892);
+ return tmp;
+ }
}
if (ctype == NULL_TREE || check)
if (flags == DTOR_FLAG)
{
char *buf, *dbuf;
- tree const_integer_type = build_type_variant (integer_type_node, 1, 0);
int len = sizeof (DESTRUCTOR_DECL_PREFIX)-1;
- arg_types = hash_tree_chain (const_integer_type, void_list_node);
+ arg_types = hash_tree_chain (integer_type_node, void_list_node);
TREE_SIDE_EFFECTS (arg_types) = 1;
/* Build the overload name. It will look like `7Example'. */
if (IDENTIFIER_TYPE_VALUE (cname))
}
}
}
- return value;
}
- if (TREE_CODE (value) == TREE_LIST && TREE_NONLOCAL_FLAG (value))
+ else if (TREE_CODE (value) == TREE_LIST && TREE_NONLOCAL_FLAG (value))
{
if (type == 0)
{
arg = TREE_TYPE (arg);
}
#endif
- if (TREE_CODE (arg) == REFERENCE_TYPE)
+ if (! subr && TREE_CODE (arg) == REFERENCE_TYPE)
arg = TREE_TYPE (arg);
- if (TREE_CODE (parm) != REFERENCE_TYPE)
+ if (! subr && TREE_CODE (parm) != REFERENCE_TYPE)
{
if (TREE_CODE (arg) == FUNCTION_TYPE
|| TREE_CODE (arg) == METHOD_TYPE)
goto fail;
if (TREE_CODE (TREE_TYPE (exprtype)) != RECORD_TYPE)
goto fail;
- if (TYPE_SIZE (TREE_TYPE (exprtype)) == NULL_TREE)
+ if (TYPE_SIZE (complete_type (TREE_TYPE (exprtype))) == NULL_TREE)
goto fail;
if (TREE_READONLY (TREE_TYPE (exprtype))
&& ! TYPE_READONLY (TREE_TYPE (type)))
case REFERENCE_TYPE:
if (TREE_CODE (TREE_TYPE (type)) != RECORD_TYPE)
goto fail;
- if (TYPE_SIZE (TREE_TYPE (type)) == NULL_TREE)
+ if (TYPE_SIZE (complete_type (TREE_TYPE (type))) == NULL_TREE)
goto fail;
break;
/* else fall through */
goto fail;
if (TREE_CODE (TREE_TYPE (exprtype)) != RECORD_TYPE)
goto fail;
- if (TYPE_SIZE (TREE_TYPE (exprtype)) == NULL_TREE)
+ if (TYPE_SIZE (complete_type (TREE_TYPE (exprtype))) == NULL_TREE)
goto fail;
if (TREE_READONLY (TREE_TYPE (exprtype))
&& ! TYPE_READONLY (TREE_TYPE (type)))
case PREINCREMENT_EXPR:
case POSTDECREMENT_EXPR:
case POSTINCREMENT_EXPR:
- case CALL_EXPR:
case ARRAY_REF:
case SCOPE_REF:
t = copy_node (t);
TREE_OPERAND (t, 1) = mapcar (TREE_OPERAND (t, 1), func);
return t;
+ case CALL_EXPR:
+ t = copy_node (t);
+ TREE_TYPE (t) = mapcar (TREE_TYPE (t), func);
+ TREE_OPERAND (t, 0) = mapcar (TREE_OPERAND (t, 0), func);
+ TREE_OPERAND (t, 1) = mapcar (TREE_OPERAND (t, 1), func);
+
+ /* tree.def says that operand two is RTL, but
+ build_call_declarator puts trees in there. */
+ if (TREE_OPERAND (t, 2)
+ && TREE_CODE (TREE_OPERAND (t, 2)) == TREE_LIST)
+ TREE_OPERAND (t, 2) = mapcar (TREE_OPERAND (t, 2), func);
+ else
+ TREE_OPERAND (t, 2) = NULL_TREE;
+ return t;
+
case CONVERT_EXPR:
case ADDR_EXPR:
case INDIRECT_REF:
if (TREE_CODE (value) == ERROR_MARK)
;
+ /* Other code expects that initializers for objects of types that need
+ constructing never make it into DECL_INITIAL, and passes 'init' to
+ expand_aggr_init without checking DECL_INITIAL. So just return. */
+ else if (TYPE_NEEDS_CONSTRUCTING (type))
+ return value;
else if (TREE_STATIC (decl)
&& (! TREE_CONSTANT (value)
|| ! initializer_constant_valid_p (value, TREE_TYPE (value))