Commit 29f4ceab by Giovanni Bajo

re PR c++/14250 (switch() does not seem to see operator int() in template class)

	PR c++/14250
	* cvt.c (build_expr_type_conversion): Type must be complete before
	looking up for conversions.

From-SVN: r78293
parent 6871ba5f
2004-02-23 Giovanni Bajo <giovannibajo@gcc.gnu.org>
PR c++/14250
* cvt.c (build_expr_type_conversion): Type must be complete before
looking up for conversions.
2004-02-23 Giovanni Bajo <giovannibajo@gcc.gnu.org>
PR c++/14143
* name-lookup.c (arg_assoc_class): Don't look into template
arguments if it is not a primary template.
......
......@@ -1034,8 +1034,9 @@ build_expr_type_conversion (int desires, tree expr, bool complain)
/* The code for conversions from class type is currently only used for
delete expressions. Other expressions are handled by build_new_op. */
if (! TYPE_HAS_CONVERSION (basetype))
if (!complete_type_or_else (basetype, expr))
return error_mark_node;
if (!TYPE_HAS_CONVERSION (basetype))
return NULL_TREE;
for (conv = lookup_conversions (basetype); conv; conv = TREE_CHAIN (conv))
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment