diff options
author | Martin v. Löwis <loewis@informatik.hu-berlin.de> | 1999-03-12 23:17:05 +0000 |
---|---|---|
committer | Martin v. Löwis <loewis@gcc.gnu.org> | 1999-03-12 23:17:05 +0000 |
commit | c592d5d2584f601fcdb594ec8ba942afc270b776 (patch) | |
tree | 61e7ca8b88314b6205d661e056855c6b0c1487fa /gcc | |
parent | 45e24d08a2c5647913c6f48a2b1c5b27c15ef7e3 (diff) | |
download | gcc-c592d5d2584f601fcdb594ec8ba942afc270b776.zip gcc-c592d5d2584f601fcdb594ec8ba942afc270b776.tar.gz gcc-c592d5d2584f601fcdb594ec8ba942afc270b776.tar.bz2 |
decl.c (select_decl): Allow class templates when we need types.
* decl.c (select_decl): Allow class templates when we need types.
* decl2.c (ambiguous_decl): Likewise.
From-SVN: r25737
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/cp/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/cp/decl.c | 3 | ||||
-rw-r--r-- | gcc/cp/decl2.c | 3 |
3 files changed, 8 insertions, 3 deletions
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index e43e9c8..d24c458 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,3 +1,8 @@ +1999-03-12 Martin von Löwis <loewis@informatik.hu-berlin.de> + + * decl.c (select_decl): Allow class templates when we need types. + * decl2.c (ambiguous_decl): Likewise. + 1999-03-12 Mark Mitchell <mark@markmitchell.com> * lex.c (do_identifier): Correct call to enforce_access. diff --git a/gcc/cp/decl.c b/gcc/cp/decl.c index 9a51e65..5eca402 100644 --- a/gcc/cp/decl.c +++ b/gcc/cp/decl.c @@ -5246,7 +5246,8 @@ select_decl (binding, flags) val = TYPE_STUB_DECL (BINDING_TYPE (binding)); /* Don't return non-types if we really prefer types. */ else if (val && LOOKUP_TYPES_ONLY (flags) && TREE_CODE (val) != TYPE_DECL - && (!looking_for_template || TREE_CODE (val) != TEMPLATE_DECL)) + && (TREE_CODE (val) != TEMPLATE_DECL + || !DECL_CLASS_TEMPLATE_P (val))) val = NULL_TREE; return val; diff --git a/gcc/cp/decl2.c b/gcc/cp/decl2.c index d9c1591..56f5839 100644 --- a/gcc/cp/decl2.c +++ b/gcc/cp/decl2.c @@ -4063,8 +4063,7 @@ ambiguous_decl (name, old, new, flags) /* If we expect types or namespaces, and not templates, or this is not a template class. */ if (LOOKUP_QUALIFIERS_ONLY (flags) - && (!(flags & LOOKUP_TEMPLATES_EXPECTED) - || !DECL_CLASS_TEMPLATE_P (val))) + && !DECL_CLASS_TEMPLATE_P (val)) val = NULL_TREE; break; case TYPE_DECL: |