This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
Re: Bug in 1.0.3
- To: Robert Krawitz <rlk at rlk-ppp-1 dot torrent dot com>
- Subject: Re: Bug in 1.0.3
- From: Alexandre Oliva <oliva at dcc dot unicamp dot br>
- Date: 31 Jul 1998 10:27:43 -0300
- Cc: egcs-bugs at cygnus dot com, smr at torrent dot com, mikeb at torrent dot com, randy at torrent dot com
- References: <199807310108.VAA31224@rlk-ppp-1.torrent.com>
Robert Krawitz <rlk@rlk-ppp-1.torrent.com> writes:
> % g++ -c foo.C
> foo.C: In method `void foo<void *>::apply(void (*)(void *const &, void *), void *)':
> foo.C:40: Internal compiler error.
> foo.C:40: Please submit a full bug report to `egcs-bugs@cygnus.com'.
The latest snapshot prints instead:
test.cc: In method `void foo<void *>::apply<void *>(void (*)(void *const &, void *), void *)':
test.cc:43: instantiated from here
test.cc:40: conversion from `void (*)(void *const &, void *)' to non-scalar type `{error}' requested
Unfortunately, this is not a very useful error message :-(
It took me some time to notice that the problem is that you're casting
`void (*)(void *const &, void *)' to `void (*)(void *&, void*)', but
the argument list of helper0<void*>::apply expects a `void (*)(void
*const&, void*'.
Removing the apparently unnecessary cast causes the problem to go
away, even with egcs 1.0.3.
--
Alexandre Oliva
mailto:oliva@dcc.unicamp.br mailto:aoliva@acm.org
http://www.dcc.unicamp.br/~oliva
Universidade Estadual de Campinas, SP, Brasil