C++: ICE 61
Martin v. Loewis
martin@mira.isdn.cs.tu-berlin.de
Sun Aug 8 07:38:00 GMT 1999
> ../../include/Widget/GapBuffer.hh:52: Internal compiler error 61.
Thanks for your bug report. I've simplified your test case a bit, and
include a patch below.
Please note that the application is in error, use -pedantic to see
why. However, the compiler should not crash; with the change below,
it is rejected properly.
Regards,
Martin
template<class T>
void value_type(T){}
template <class T>
struct B{
typedef T value_type;
};
template<class>class Vector{};
template<class T>
struct D:B<T>{
Vector<value_type> r;
};
1999-08-08 Martin v. Loewis <martin@mira.isdn.cs.tu-berlin.de>
* lex.c (do_identifier): If we find a hidden type after a global
was selected already, continue using the global.
Index: lex.c
===================================================================
RCS file: /egcs/carton/cvsfiles/egcs/gcc/cp/lex.c,v
retrieving revision 1.130
diff -u -r1.130 lex.c
--- lex.c 1999/08/07 22:28:51 1.130
+++ lex.c 1999/08/08 13:35:59
@@ -3109,6 +3109,12 @@
|| TREE_CODE (field) == CONST_DECL
|| TREE_CODE (field) == TEMPLATE_DECL)
id = field;
+ else if (TREE_CODE (field) == TYPE_DECL
+ && IMPLICIT_TYPENAME_TYPE_DECL_P (field))
+ /* The implicit typename extensions breaks since we found
+ a global declaration with the same name. It's too late
+ now to say we got a type, so use the global. */
+ ;
else if (TREE_CODE (field) != FIELD_DECL)
my_friendly_abort (61);
else
More information about the Gcc-bugs
mailing list