]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
decl.c (make_implicit_typename): Only change the type of a TYPENAME_TYPE.
authorJason Merrill <jason@yorick.cygnus.com>
Wed, 18 Mar 1998 12:42:05 +0000 (12:42 +0000)
committerJason Merrill <jason@gcc.gnu.org>
Wed, 18 Mar 1998 12:42:05 +0000 (07:42 -0500)
* decl.c (make_implicit_typename): Only change the type of a
TYPENAME_TYPE.

From-SVN: r18668

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

index 723c5a2f365034696bcc9be5817d6ab963bee743..b8269f39eb899f7e239147d48dcd023dfd8e64bf 100644 (file)
@@ -1,3 +1,8 @@
+Wed Mar 18 12:41:43 1998  Jason Merrill  <jason@yorick.cygnus.com>
+
+       * decl.c (make_implicit_typename): Only change the type of a 
+       TYPENAME_TYPE.
+
 Wed Mar 18 10:09:51 1998  Mark Mitchell  <mmitchell@usa.net>
 
        * semantics.c: New file, containing routines to perform the
index 4c33191a705fcc0e6db29670c6291fba40c77307..80fc9592292367fe65a9505210180a1b5d011a53 100644 (file)
@@ -4592,8 +4592,9 @@ make_implicit_typename (context, t)
     }
   else
     retval = make_typename_type (context, DECL_NAME (t));
-  
-  TREE_TYPE (retval) = TREE_TYPE (t);
+
+  if (TREE_CODE (retval) == TYPENAME_TYPE)
+    TREE_TYPE (retval) = TREE_TYPE (t);
   return retval;
 }