aboutsummaryrefslogtreecommitdiff
path: root/gcc/cp/search.c
diff options
context:
space:
mode:
authorKriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>2005-01-06 16:04:05 +0000
committerKriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>2005-01-06 16:04:05 +0000
commit4098cf5e97356abd1ae0d5981b2afc003d94b5d3 (patch)
tree1502c1fa1cbff0c72d36506b0b9c95bf80de25cd /gcc/cp/search.c
parent377728cea776baa66d2fa96f4716b4bb9888593f (diff)
PR c++/17154
* search.c (lookup_field_1): Handle using declaration in class template partial specialization. * g++.dg/template/using9.C: New test. git-svn-id: https://gcc.gnu.org/svn/gcc/trunk@92994 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/cp/search.c')
-rw-r--r--gcc/cp/search.c13
1 files changed, 5 insertions, 8 deletions
diff --git a/gcc/cp/search.c b/gcc/cp/search.c
index 8c26565147a..8d5ae655cea 100644
--- a/gcc/cp/search.c
+++ b/gcc/cp/search.c
@@ -1,7 +1,7 @@
/* Breadth-first and depth-first routines for
searching multiple-inheritance lattice for GNU C++.
Copyright (C) 1987, 1989, 1992, 1993, 1994, 1995, 1996, 1997, 1998,
- 1999, 2000, 2002, 2003, 2004 Free Software Foundation, Inc.
+ 1999, 2000, 2002, 2003, 2004, 2005 Free Software Foundation, Inc.
Contributed by Michael Tiemann (tiemann@cygnus.com)
This file is part of GCC.
@@ -470,13 +470,10 @@ lookup_field_1 (tree type, tree name, bool want_type)
the compiler cannot handle that. Once the class is
defined, USING_DECLs are purged from TYPE_FIELDS; see
handle_using_decl. However, we make special efforts to
- make using-declarations in template classes work
- correctly. */
- if (CLASSTYPE_TEMPLATE_INFO (type)
- && !CLASSTYPE_USE_TEMPLATE (type)
- && !TREE_TYPE (field))
- ;
- else
+ make using-declarations in class templates and class
+ template partial specializations work correctly noticing
+ that dependent USING_DECL's do not have TREE_TYPE set. */
+ if (TREE_TYPE (field))
continue;
}