Commit b2693faf by Giovanni Bajo

pt.c (tsubst_qualified_id): Improved error message when a type is expected but not found.

	* pt.c (tsubst_qualified_id): Improved error message when a type
	is expected but	not found.

From-SVN: r77089
parent 66fd46b6
...@@ -7264,8 +7264,11 @@ tsubst_qualified_id (tree qualified_id, tree args, ...@@ -7264,8 +7264,11 @@ tsubst_qualified_id (tree qualified_id, tree args,
? DECL_TEMPLATE_RESULT (expr) : expr) == TYPE_DECL) ? DECL_TEMPLATE_RESULT (expr) : expr) == TYPE_DECL)
{ {
if (complain & tf_error) if (complain & tf_error)
error ("`%E' names a type, but a non-type is expected", {
qualified_id); error ("dependent-name`%E' is parsed as a non-type, but "
"instantiation yields a type", qualified_id);
inform ("say `typename %E' if a type is meant", qualified_id);
}
return error_mark_node; return error_mark_node;
} }
} }
......
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