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: cannot convert `int (*)()' to `void*' in initialization - should not be an error


On May 31, 2001, "Stuehlmeyer, Wolfgang" <Wolfgang.Stuehlmeyer@softwareag.com> wrote:

> 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) 

> No error messages with the gcc 2.95.2 or 2.95.3. 

They were in error.  GCC 3.0 is correct.  C++ doesn't allow implicit
conversion from function types to void*.

-- 
Alexandre Oliva   Enjoy Guarana', see http://www.ic.unicamp.br/~oliva/
Red Hat GCC Developer                  aoliva@{cygnus.com, redhat.com}
CS PhD student at IC-Unicamp        oliva@{lsd.ic.unicamp.br, gnu.org}
Free Software Evangelist    *Please* write to mailing lists, not to me


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