Commit c16c47fb by Jason Merrill

friend.c (make_friend_class): Avoid core dump when not-yet-defined friend type…

friend.c (make_friend_class): Avoid core dump when not-yet-defined friend type lacks TYPE_LANG_SPECIFIC().

	* friend.c (make_friend_class): Avoid core dump when
	not-yet-defined friend type lacks TYPE_LANG_SPECIFIC().
	* decl.c (start_function): Suppress normal linkage heuristics
	for #pragma interface under MULTIPLE_SYMBOL_SPACES.

From-SVN: r25857
parent 192babfd
1999-03-19 Chip Salzenberg <chip@perlsupport.com>
* friend.c (make_friend_class): Avoid core dump when
not-yet-defined friend type lacks TYPE_LANG_SPECIFIC().
1999-03-18 Jason Merrill <jason@yorick.cygnus.com>
* decl.c (start_function): Suppress normal linkage heuristics
for #pragma interface under MULTIPLE_SYMBOL_SPACES.
1999-03-19 Alexandre Oliva <oliva@dcc.unicamp.br>
* Make-lang.in: ($(INTL_TARGETS)): depend on cp/parse.c
......
......@@ -13133,6 +13133,20 @@ start_function (declspecs, declarator, attrs, pre_parsed_p)
DECL_NOT_REALLY_EXTERN (decl1) = 0;
DECL_INTERFACE_KNOWN (decl1) = 1;
}
else if (interface_unknown && interface_only
&& (! DECL_TEMPLATE_INSTANTIATION (decl1)
|| flag_alt_external_templates))
{
/* If MULTIPLE_SYMBOL_SPACES is defined and we saw a #pragma
interface, we will have interface_only set but not
interface_known. In that case, we don't want to use the normal
heuristics because someone will supply a #pragma implementation
elsewhere, and deducing it here would produce a conflict. */
comdat_linkage (decl1);
DECL_EXTERNAL (decl1) = 0;
DECL_INTERFACE_KNOWN (decl1) = 1;
DECL_DEFER_OUTPUT (decl1) = 1;
}
else
{
/* This is a definition, not a reference.
......
......@@ -263,7 +263,8 @@ make_friend_class (type, friend_type)
return;
}
if (CLASSTYPE_TEMPLATE_SPECIALIZATION (friend_type)
if (CLASS_TYPE_P (friend_type)
&& CLASSTYPE_TEMPLATE_SPECIALIZATION (friend_type)
&& uses_template_parms (friend_type))
{
/* [temp.friend]
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment