This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
Re: cannot convert `int (*)()' to `void*' in initialization - should not be an error
- To: "Stuehlmeyer, Wolfgang" <Wolfgang dot Stuehlmeyer at softwareag dot com>
- Subject: Re: cannot convert `int (*)()' to `void*' in initialization - should not be an error
- From: Gabriel Dos Reis <Gabriel dot Dos-Reis at cmla dot ens-cachan dot fr>
- Date: 31 May 2001 19:30:54 +0200
- Cc: "'gcc-bugs at gcc dot gnu dot org'" <gcc-bugs at gcc dot gnu dot org>
- Organization: CMLA, ENS Cachan -- CNRS UMR 8536 (France)
- References: <2B1792E820ACD411AD5A00508BF9A3FC369107@daemsg03.software-ag.de>
"Stuehlmeyer, Wolfgang" <Wolfgang.Stuehlmeyer@softwareag.com> writes:
| Hello,
|
| i get multiple error messages of type
| "cannot convert `int (*)()' to `void*' in assignment"
| and
| "cannot convert `int (*)()' to `void*' in initialization"
|
| with the gcc 3.0 Compiler. (gcc-3.0-20010517.tar.gz)
That is right.
| No error messages with the gcc 2.95.2 or 2.95.3.
That was a bug.
If you really wantt to convert a funtion pointer to void*, you need an
explicit cast.
-- Gaby