static_cast problem

Martin v. Loewis martin@loewis.home.cs.tu-berlin.de
Sat Jan 1 15:40:00 GMT 2000


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

Regards,
Martin


More information about the Gcc-bugs mailing list