cannot convert `int (*)()' to `void*' in initialization - should not be an error
Carlo Wood
carlo@alinoe.com
Thu May 31 12:13:00 GMT 2001
On Thu, May 31, 2001 at 10:18:27AM -0300, Alexandre Oliva wrote:
> They were in error. GCC 3.0 is correct. C++ doesn't allow implicit
> conversion from function types to void*.
I noticed this too (and had to add a cast). What is the reason
that C++ doesn't allow this? I don't like casts, they normally
lead to bugs later on. What is the pitfal in this case? Probably
the same as the reason that C++ forbids it.
--
Carlo Wood <carlo@alinoe.com>
More information about the Gcc-bugs
mailing list