authorbkoz <bkoz@138bc75d-0d04-0410-961f-82ee72b054a4>
Tue, 22 Sep 1998 12:05:50 +0000 (12:05 +0000)
committerbkoz <bkoz@138bc75d-0d04-0410-961f-82ee72b054a4>
Tue, 22 Sep 1998 12:05:50 +0000 (12:05 +0000)
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.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@22550 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/cp/ChangeLog
gcc/cp/decl.c

index 360dcb0..ade6763 100644 (file)
@@ -1,3 +1,8 @@
+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.
index 17078e0..a8317cc 100644 (file)
@@ -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))
     {