egcs `Internal compiler error' on incorrect input

Alexandre Oliva oliva@dcc.unicamp.br
Sun Oct 4 19:39:00 GMT 1998


Richard Kettlewell <rjk@greenend.org.uk> writes:

> class base { public: void somefn(); void method(char *); };
> struct { void (base::*ptr)(char *); } s[] = { {&base::method}, };
> void base::method(char *) { }
> void base::somefn() { s[0].ptr(""); }

> gcc version egcs-2.90.27 980315 (egcs-1.0.2 release)
> t.cc:17: Internal compiler error.

egcs 1.1 says:

t.cc: In method `void base::somefn()':
t.cc:17: pointer-to-member function (&s)->{anonymous struct}::ptr cannot be called
t.cc:17: without an object; consider using .* or ->*

Thanks for your bug report

-- 
Alexandre Oliva
mailto:oliva@dcc.unicamp.br mailto:aoliva@acm.org
http://www.dcc.unicamp.br/~oliva
Universidade Estadual de Campinas, SP, Brasil




More information about the Gcc-bugs mailing list