This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the EGCS project.
[C++] Re: va_list: ppc
- To: Franz Sirl <Franz.Sirl-kernel@lauterbach.com>
- Subject: [C++] Re: va_list: ppc
- From: Richard Henderson <rth@cygnus.com>
- Date: Mon, 2 Aug 1999 13:45:34 -0700
- Cc: gcc-patches@gcc.gnu.org
- References: <4.2.0.58.19990729181805.00ca4680@mail.lauterbach.com> <99080100440600.04154@ns1102.munich.netsurf.de>
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)