C++ PATCH to avoid crash
Mark Mitchell
mark@markmitchell.com
Thu Dec 10 14:17:00 GMT 1998
Here's a patch to avoid a crash on eb131.C.
--
Mark Mitchell mark@markmitchell.com
Mark Mitchell Consulting http://www.markmitchell.com
1998-12-10 Mark Mitchell <mark@markmitchell.com>
* class.c (instantiate_type): Return error_mark_node rather than
junk.
Index: testsuite/g++.old-deja/g++.robertl/eb131.C
===================================================================
RCS file: /egcs/carton/cvsfiles/egcs/gcc/testsuite/g++.old-deja/g++.robertl/eb131.C,v
retrieving revision 1.6
diff -c -p -r1.6 eb131.C
*** eb131.C 1998/10/19 20:13:15 1.6
--- eb131.C 1998/12/10 21:33:00
*************** struct a {
*** 10,16 ****
void bar( double );
void bar( float );
! void foo( void (a::*member)(float) );
};
a::a()
--- 10,16 ----
void bar( double );
void bar( float );
! void foo( void (a::*member)(float) ); // ERROR - candidate
};
a::a()
Index: cp/class.c
===================================================================
RCS file: /egcs/carton/cvsfiles/egcs/gcc/cp/class.c,v
retrieving revision 1.118
diff -c -p -r1.118 class.c
*** class.c 1998/12/09 16:20:01 1.118
--- class.c 1998/12/10 21:33:04
*************** instantiate_type (lhstype, rhs, complain
*** 5304,5309 ****
--- 5304,5310 ----
function);
cp_error (" to form a pointer to member function, say `&%T::%D'",
t, DECL_NAME (function));
+ return error_mark_node;
}
mark_used (function);
More information about the Gcc-patches
mailing list