This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
Re: static_cast problem
- To: "Martin v. Loewis" <martin at loewis dot home dot cs dot tu-berlin dot de>
- Subject: Re: static_cast problem
- From: Nathan Sidwell <nathan at acm dot org>
- Date: Mon, 03 Jan 2000 11:59:10 +0000
- CC: drepper at cygnus dot com, gcc-bugs at sourceware dot cygnus dot com
- References: <m3iu1e8kdy.fsf@localhost.localnet> <200001012336.AAA25509@loewis.home.cs.tu-berlin.de>
- Reply-To: nathan at compsci dot bristol dot ac dot uk
"Martin v. Loewis" wrote:
>
> > I sumpled accross this problem in the current mainline gcc while
> > compiling Mozilla:
>
> Thanks for your bug report. I believe the bug was caused by the change
>
> 1999-12-20 Nathan Sidwell <nathan@acm.org>
>
> * typeck.c (strip_all_pointer_quals): New static function.
> (build_static_cast): Use it. Don't use at_least_as_qualified_p.
>
> The problem is that it now strips all pointer quals, trying to convert
> from "class foo" to "char *". This is not a standard conversion, so it
> looks-up all conversion operators. However, the operator producing
> "const char*" is not suitable anymore, because of cv-qualification.
Ok, thanks for confirming my suspicion, I'll get to it.
nathan
--
Dr Nathan Sidwell :: Computer Science Department :: Bristol University
Never hand someone a gun unless you are sure where they will point it
nathan@acm.org http://www.cs.bris.ac.uk/~nathan/ nathan@cs.bris.ac.uk