Commit 04ddee1b by Benjamin Kosnik Committed by Benjamin Kosnik

decl.c (make_typename_type): Move error to point where name variable can be used by dump_type.

�
1998-09-22  Benjamin Kosnik  <bkoz@loony.cygnus.com>
        * decl.c (make_typename_type): Move error to point where name
        variable can be used by dump_type.

From-SVN: r22550
parent 3ddfb0e6
1998-09-22 Benjamin Kosnik <bkoz@loony.cygnus.com>
* decl.c (make_typename_type): Move error to point where name
variable can be used by dump_type.
1998-09-22 Mark Mitchell <mark@markmitchell.com>
* decl.c (grokfndecl): Improve error-recovery.
......
......@@ -4787,15 +4787,6 @@ make_typename_type (context, name)
fullname = name;
if (TREE_CODE (context) == NAMESPACE_DECL)
{
/* We can get here from typename_sub0 in the explicit_template_type
expansion. Just fail. */
cp_error ("no class template named `%#T' in `%#T'",
name, context);
return error_mark_node;
}
if (TREE_CODE (name) == TEMPLATE_ID_EXPR)
{
name = TREE_OPERAND (name, 0);
......@@ -4805,6 +4796,15 @@ make_typename_type (context, name)
if (TREE_CODE (name) != IDENTIFIER_NODE)
my_friendly_abort (2000);
if (TREE_CODE (context) == NAMESPACE_DECL)
{
/* We can get here from typename_sub0 in the explicit_template_type
expansion. Just fail. */
cp_error ("no class template named `%#T' in `%#T'",
name, context);
return error_mark_node;
}
if (! uses_template_parms (context)
|| currently_open_class (context))
{
......
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