This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: c++ cast bug ?
- To: John Levon <moz at compsoc dot man dot ac dot uk>
- Subject: Re: c++ cast bug ?
- From: Alexandre Oliva <aoliva at redhat dot com>
- Date: 27 Sep 2001 05:34:46 -0300
- Cc: gcc at gcc dot gnu dot org
- Organization: GCC Team, Red Hat
- References: <20010920045222.A414@compsoc.man.ac.uk>
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