This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
PATCH: SEGV on template parameter friend
- To: egcs-patches at cygnus dot com
- Subject: PATCH: SEGV on template parameter friend
- From: Chip Salzenberg <chip at perlsupport dot com>
- Date: Sun, 10 Jan 1999 11:51:08 -0500
The attached C++ source code causes egcs-990103 to follow a null
pointer. The below patch avoids this problem. However, I'm not
entirely sure whether this is a real fix or just a bandaid.
Index: gcc/cp/ChangeLog
***************
*** 1,2 ****
--- 1,7 ----
+ 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().
+
1998-12-23 Chip Salzenberg <chip@perlsupport.com>
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."
ts.i.gz