This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

G++ still needs friend parameter type patch


[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."


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]