diff options
author | Jason Merrill <jason@yorick.cygnus.com> | 1998-07-25 03:19:28 +0000 |
---|---|---|
committer | Jason Merrill <jason@gcc.gnu.org> | 1998-07-24 23:19:28 -0400 |
commit | b8b1a3c1fc085961a6f9f1ef64501e5c380ff9de (patch) | |
tree | 8485d87dc33117b077a6dbd4798d60f3cb61b5dd | |
parent | dd7ff7a98fc5a8394174a8a5f9d6e6b5e4efcd02 (diff) | |
download | gcc-b8b1a3c1fc085961a6f9f1ef64501e5c380ff9de.zip gcc-b8b1a3c1fc085961a6f9f1ef64501e5c380ff9de.tar.gz gcc-b8b1a3c1fc085961a6f9f1ef64501e5c380ff9de.tar.bz2 |
decl.c (lookup_name_real): OK, do return the from_obj value unless got_object depends on template parms.
* decl.c (lookup_name_real): OK, do return the from_obj value
unless got_object depends on template parms.
From-SVN: r21370
-rw-r--r-- | gcc/cp/ChangeLog | 3 | ||||
-rw-r--r-- | gcc/cp/decl.c | 7 |
2 files changed, 8 insertions, 2 deletions
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index 127c8e9..c44d18a 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,5 +1,8 @@ 1998-07-24 Jason Merrill <jason@yorick.cygnus.com> + * decl.c (lookup_name_real): OK, do return the from_obj value + unless got_object depends on template parms. + * parse.y (nested_name_specifier_1): Pull out the TYPE_MAIN_VARIANT. * pt.c (coerce_template_parms): Also complain about local enums. diff --git a/gcc/cp/decl.c b/gcc/cp/decl.c index f25c700..0149679 100644 --- a/gcc/cp/decl.c +++ b/gcc/cp/decl.c @@ -5085,8 +5085,11 @@ lookup_name_real (name, prefer_type, nonclass, namespaces_only) TREE_TYPE (val)); } - /* We don't change val to from_obj here because that breaks - implicit typename for destructor calls. */ + /* We don't change val to from_obj if got_object depends on + template parms because that breaks implicit typename for + destructor calls. */ + if (! uses_template_parms (got_object)) + val = got_object; } if ((TREE_CODE (val) == TEMPLATE_DECL && looking_for_template) |