From 74ef3b26f3efc6b3c36aaf2bad21f035c8aa3ad1 Mon Sep 17 00:00:00 2001 From: Jason Merrill Date: Wed, 18 Mar 1998 12:42:05 +0000 Subject: [PATCH] decl.c (make_implicit_typename): Only change the type of a TYPENAME_TYPE. * decl.c (make_implicit_typename): Only change the type of a TYPENAME_TYPE. From-SVN: r18668 --- gcc/cp/ChangeLog | 5 +++++ gcc/cp/decl.c | 5 +++-- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index 723c5a2f365..b8269f39eb8 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,3 +1,8 @@ +Wed Mar 18 12:41:43 1998 Jason Merrill + + * decl.c (make_implicit_typename): Only change the type of a + TYPENAME_TYPE. + Wed Mar 18 10:09:51 1998 Mark Mitchell * semantics.c: New file, containing routines to perform the diff --git a/gcc/cp/decl.c b/gcc/cp/decl.c index 4c33191a705..80fc9592292 100644 --- a/gcc/cp/decl.c +++ b/gcc/cp/decl.c @@ -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; }