This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
G++ still needs friend parameter type patch
- To: egcs-patches at egcs dot cygnus dot com
- Subject: G++ still needs friend parameter type patch
- From: Chip Salzenberg <chip at perlsupport dot com>
- Date: Mon, 1 Feb 1999 23:25:59 -0500
[sorry if this is a repeat -- I didn't see the previous one
returned to me]
The below patch hasn't yet made it into the C++ front end, but without
it I get core dumps -- CLASSTYPE_TEMPLATE_SPECIALIZATION follows
TYPE_LANG_SPECIFIC, but sometimes TYPE_LANG_SPECIFIC is null.
1999-01-06 Chip Salzenberg <chip@perlsupport.com>
* friend.c (make_friend_class): Avoid core dump when
not-yet-defined friend type lacks TYPE_LANG_SPECIFIC().
Index: gcc/cp/friend.c
*************** make_friend_class (type, friend_type)
*** 262,266 ****
}
! if (CLASSTYPE_TEMPLATE_SPECIALIZATION (friend_type)
&& uses_template_parms (friend_type))
{
--- 262,267 ----
}
! if (TYPE_LANG_SPECIFIC (friend_type)
! && CLASSTYPE_TEMPLATE_SPECIALIZATION (friend_type)
&& uses_template_parms (friend_type))
{
--
Chip Salzenberg - a.k.a. - <chip@perlsupport.com>
"When do you work?" "Whenever I'm not busy."