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


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

[C++] Re: va_list: ppc


On Sun, Aug 01, 1999 at 12:33:11AM +0200, Franz Sirl wrote:
> Unfortunately I still cannot bootstrap, compilation stops while compiling
> libio.
[...]
> Program received signal SIGSEGV, Segmentation fault.
[...]
> 1752        case RECORD_TYPE:
> 1753          if (TYPE_PTRMEMFUNC_P (t))  <<<<
> 1754            TRY (TYPE_PTRMEMFUNC_FN_TYPE (t));
> 1755          break;

A minimal fix for this follows.  I don't know how many other
macros might need fixing due to the lack of TYPE_LANG_SPECIFIC.
Perhaps instead there should be a known callback to set up 
whatever extra type info is needed?


r~


	* cp-tree.h (TYPE_PTRMEMFUNC_P): Check TYPE_LANG_SPECIFIC non-null.

Index: cp/cp-tree.h
===================================================================
RCS file: /egcs/carton/cvsfiles/egcs/gcc/cp/cp-tree.h,v
retrieving revision 1.251
diff -c -p -d -r1.251 cp-tree.h
*** cp-tree.h	1999/07/31 01:13:31	1.251
--- cp-tree.h	1999/08/02 20:43:25
*************** extern int flag_new_for_scope;
*** 1780,1787 ****
  
  /* Nonzero for _TYPE node means that this type is a pointer to member
     function type.  */
! #define TYPE_PTRMEMFUNC_P(NODE) \
!   (TREE_CODE(NODE) == RECORD_TYPE && TYPE_PTRMEMFUNC_FLAG (NODE))
  #define TYPE_PTRMEMFUNC_FLAG(NODE) \
    (TYPE_LANG_SPECIFIC(NODE)->type_flags.ptrmemfunc_flag)
  
--- 1780,1790 ----
  
  /* Nonzero for _TYPE node means that this type is a pointer to member
     function type.  */
! #define TYPE_PTRMEMFUNC_P(NODE)		\
!   (TREE_CODE(NODE) == RECORD_TYPE	\
!    && TYPE_LANG_SPECIFIC(NODE)		\
!    && TYPE_PTRMEMFUNC_FLAG (NODE))
! 
  #define TYPE_PTRMEMFUNC_FLAG(NODE) \
    (TYPE_LANG_SPECIFIC(NODE)->type_flags.ptrmemfunc_flag)
  

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