This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
egcs-19990913: cannot convert `int (*)(int)' to `void *' in assignment
- To: bug-gcc at gnu dot org
- Subject: egcs-19990913: cannot convert `int (*)(int)' to `void *' in assignment
- From: Laurent Bonnaud <Laurent dot Bonnaud at irisa dot fr>
- Date: 20 Sep 1999 10:19:14 +0200
Hi,
the following code compiles with gcc-2.95.x but egcs rejects it:
int main()
{
int (*p1)(int)=0;
int (*p2)(int);
(void* &) p2=p1;
}
$ gcc convert.cc
convert.cc: In function `int main()':
convert.cc:6: cannot convert `int (*)(int)' to `void *' in assignment
$ gcc -v
Reading specs from /usr/local/egcs-19990913/lib/gcc-lib/i686-pc-linux-gnu/2.96/specs
gcc version 2.96 19990913 (experimental)
I know the code looks rather strange but that's what you find sometimes
in some libraries :>.
--
Laurent.