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


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

Re: Bug in egcs-1.1b (egcs-2.91.57)


John Polstra <jdp@polstra.com> writes:

> The following test case illustrates a bug in egcs-1.1b (egcs-2.91.57).
> The compiler gets confused about the types of things and erroneously
> complains about the assignment "spec.handler = &HandleReadCommand;"

Fixed in the latest snapshot.  BTW, in order to form a pointer to
member, you *must* use a qualified name such as
&DeviceHandler::HandleReadCommand.  Just &HandleReadCommand won't do,
even within a member function of DeviceHandler, according to the C++
Standard.  Furthermore, your program will not compile with -ansi
-pedantic; it's missing the `typename' keyword before
template-dependent type names

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



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