diff options
author | Jason Merrill <jason@yorick.cygnus.com> | 1998-10-28 21:02:49 +0000 |
---|---|---|
committer | Jason Merrill <jason@gcc.gnu.org> | 1998-10-28 16:02:49 -0500 |
commit | e15a4d0dc0554a5839abe701431e6c5137c22793 (patch) | |
tree | a287d5ae40e2c2fbe1e011355bd299548ae07800 /gcc | |
parent | 2455f26fc144984fa410ac85ae9efa6cbbac6ffb (diff) | |
download | gcc-e15a4d0dc0554a5839abe701431e6c5137c22793.zip gcc-e15a4d0dc0554a5839abe701431e6c5137c22793.tar.gz gcc-e15a4d0dc0554a5839abe701431e6c5137c22793.tar.bz2 |
class.c (instantiate_type): Don't consider templates for a normal match.
* class.c (instantiate_type): Don't consider templates for a normal
match.
From-SVN: r23412
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/cp/ChangeLog | 4 | ||||
-rw-r--r-- | gcc/cp/class.c | 9 |
2 files changed, 10 insertions, 3 deletions
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index 8fff4d0..1e07758 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,5 +1,8 @@ 1998-10-28 Jason Merrill <jason@yorick.cygnus.com> + * class.c (instantiate_type): Don't consider templates for a normal + match. + * class.c (finish_struct_1): Don't complain about non-copy assignment ops in union members. @@ -10,6 +13,7 @@ (finish_prevtable_vardecl): Lose. (finish_file): Don't call it. * pt.c (instantiate_class_template): Likewise. + * cp-tree.h: Remove it. * init.c (build_delete): Reset TYPE_HAS_DESTRUCTOR here. * decl.c (finish_function): Not here. diff --git a/gcc/cp/class.c b/gcc/cp/class.c index 1378fa2..3cd89a6 100644 --- a/gcc/cp/class.c +++ b/gcc/cp/class.c @@ -5140,7 +5140,8 @@ instantiate_type (lhstype, rhs, complain) else for (elems = rhs; elems; elems = OVL_CHAIN (elems)) { elem = OVL_FUNCTION (elems); - if (comptypes (lhstype, TREE_TYPE (elem), 1)) + if (TREE_CODE (elem) == FUNCTION_DECL + && comptypes (lhstype, TREE_TYPE (elem), 1)) { mark_used (elem); return elem; @@ -5195,7 +5196,8 @@ instantiate_type (lhstype, rhs, complain) for (elems = rhs; elems; elems = OVL_NEXT (elems)) { elem = OVL_CURRENT (elems); - if (comp_target_types (lhstype, TREE_TYPE (elem), 1) > 0) + if (TREE_CODE (elem) == FUNCTION_DECL + && comp_target_types (lhstype, TREE_TYPE (elem), 1) > 0) break; } if (elems) @@ -5205,7 +5207,8 @@ instantiate_type (lhstype, rhs, complain) elems = OVL_CHAIN (elems)) { elem = OVL_FUNCTION (elems); - if (comp_target_types (lhstype, TREE_TYPE (elem), 0) > 0) + if (TREE_CODE (elem) == FUNCTION_DECL + && comp_target_types (lhstype, TREE_TYPE (elem), 0) >0) break; } if (elems) |