This is the mail archive of the gcc@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: c++ cast bug ?


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


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