c++ cast bug ?
Alexandre Oliva
aoliva@redhat.com
Thu Sep 27 05:42:00 GMT 2001
On Sep 20, 2001, John Levon <moz@compsoc.man.ac.uk> wrote:
> oprofpp.c:143: cannot convert `char **' to `const char **' for argument
> `3' to `poptGetContext (const char *, int, const char **, const
> poptOption *, int)'
> how can this be right (where is implicit cast to const version of char **) ?
The argument was const_casted to char**, but the parameter has type
const char**, and there's no implicit conversion from char** to const
char**.
> if it's wrong or not, how do I fix my code to work ?
Just take the const_cast out.
--
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
More information about the Gcc
mailing list