diff options
author | jason <jason@138bc75d-0d04-0410-961f-82ee72b054a4> | 1998-03-19 21:59:35 +0000 |
---|---|---|
committer | jason <jason@138bc75d-0d04-0410-961f-82ee72b054a4> | 1998-03-19 21:59:35 +0000 |
commit | b89e22bb34781c2a1ae819f5b28a14e7dc03dc32 (patch) | |
tree | 166b4f7aea03e2652cd59ebfdf59d12e86854bcd | |
parent | a8352d21a97b18ace689f5a2fef5b02a847f17ed (diff) | |
download | gcc-b89e22bb34781c2a1ae819f5b28a14e7dc03dc32.tar.gz |
* decl.c (make_implicit_typename): Lose useless code.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@18719 138bc75d-0d04-0410-961f-82ee72b054a4
-rw-r--r-- | gcc/cp/ChangeLog | 2 | ||||
-rw-r--r-- | gcc/cp/decl.c | 27 |
2 files changed, 4 insertions, 25 deletions
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index b70bef15c74..2169907c988 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,5 +1,7 @@ Thu Mar 19 11:51:58 1998 Jason Merrill <jason@yorick.cygnus.com> + * decl.c (make_implicit_typename): Lose useless code. + * call.c (standard_conversion): Handle A* -> const A* properly. * pt.c (get_bindings_real): Rename from get_bindings. Add diff --git a/gcc/cp/decl.c b/gcc/cp/decl.c index 09ad59ca170..98ffff9d70f 100644 --- a/gcc/cp/decl.c +++ b/gcc/cp/decl.c @@ -4575,8 +4575,7 @@ make_typename_type (context, name) } /* Given a TYPE_DECL T looked up in CONTEXT, return a TYPENAME_TYPE - where the scope is either CONTEXT or the first base of CONTEXT along the - inheritance chain to T that depends on template parameters. + where the scope is CONTEXT. Also remember what type T refers to. Called from lookup_name_real to implement the implicit typename extension. */ @@ -4585,29 +4584,7 @@ static tree make_implicit_typename (context, t) tree context, t; { - tree retval; - - if (TREE_CODE (context) != TYPENAME_TYPE - && uses_template_parms (DECL_CONTEXT (t)) - && DECL_CONTEXT (t) != context) - { - tree binfo = get_binfo (DECL_CONTEXT (t), context, 0); - while (binfo) - { - tree next = BINFO_INHERITANCE_CHAIN (binfo); - if (! uses_template_parms (BINFO_TYPE (next)) - || BINFO_TYPE (next) == context) - break; - binfo = next; - } - if (binfo) - retval = make_typename_type (BINFO_TYPE (binfo), DECL_NAME (t)); - else - /* FIXME: find the enclosing class whose base t comes from. */ - retval = make_typename_type (DECL_CONTEXT (t), DECL_NAME (t)); - } - else - retval = make_typename_type (context, DECL_NAME (t)); + tree retval = make_typename_type (context, DECL_NAME (t)); if (TREE_CODE (retval) == TYPENAME_TYPE) TREE_TYPE (retval) = TREE_TYPE (t); |