diff options
author | jason <jason@138bc75d-0d04-0410-961f-82ee72b054a4> | 1998-05-18 03:03:44 +0000 |
---|---|---|
committer | jason <jason@138bc75d-0d04-0410-961f-82ee72b054a4> | 1998-05-18 03:03:44 +0000 |
commit | 8471ea8e501c4074264ee713a65d3847b735ad11 (patch) | |
tree | 90b6f69b529c5e3f2bc69b325432e3b5bad52433 /gcc | |
parent | 56cd3af3c69d3ae7a41940d7d2fce3ad55a7d9d4 (diff) | |
download | gcc-8471ea8e501c4074264ee713a65d3847b735ad11.tar.gz |
* class.c (instantiate_type): Don't abort on TREE_NONLOCAL_FLAG.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@19831 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/cp/ChangeLog | 7 | ||||
-rw-r--r-- | gcc/cp/class.c | 38 |
2 files changed, 22 insertions, 23 deletions
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index b7757ae6b2f..eec4cd8f9e4 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,5 +1,12 @@ +Mon May 18 03:00:57 1998 Jason Merrill <jason@yorick.cygnus.com> + + * class.c (instantiate_type): Don't abort on TREE_NONLOCAL_FLAG. + Mon May 18 01:43:01 1998 Martin v. Loewis <loewis@informatik.hu-berlin.de> + * decl.c (lookup_name_real): Don't look at IDENTIFIER_LOCAL_VALUE + for a type unless it is one. + * class.c (finish_struct_1): Use OVL_CURRENT in error message. Mon May 18 01:24:08 1998 Jeffrey A Law (law@cygnus.com) diff --git a/gcc/cp/class.c b/gcc/cp/class.c index d4258db2e17..b6ca77e7c32 100644 --- a/gcc/cp/class.c +++ b/gcc/cp/class.c @@ -5229,16 +5229,18 @@ instantiate_type (lhstype, rhs, complain) tree elem, baselink, name = NULL_TREE; if (TREE_PURPOSE (rhs) == error_mark_node) - { - /* Make sure we don't drop the non-local flag, as the old code - would rely on it. */ - int nl = TREE_NONLOCAL_FLAG (rhs); - /* We don't need the type of this node. */ - rhs = TREE_VALUE (rhs); - my_friendly_assert (TREE_NONLOCAL_FLAG (rhs) == nl, 980331); - } + { + /* Make sure we don't drop the non-local flag, as the old code + would rely on it. */ + int nl = TREE_NONLOCAL_FLAG (rhs); + /* We don't need the type of this node. */ + rhs = TREE_VALUE (rhs); + my_friendly_assert (TREE_NONLOCAL_FLAG (rhs) == nl, 980331); + } + /* Now we should have a baselink. */ - my_friendly_assert (TREE_CODE (TREE_PURPOSE (rhs)) == TREE_VEC, 980331); + my_friendly_assert (TREE_CODE (TREE_PURPOSE (rhs)) == TREE_VEC, + 980331); /* First look for an exact match. Search member functions. May have to undo what `default_conversion' might do to lhstype. */ @@ -5247,20 +5249,10 @@ instantiate_type (lhstype, rhs, complain) if (lhstype == error_mark_node) return lhstype; - if (TREE_NONLOCAL_FLAG (rhs)) - { - my_friendly_abort (980401); - /* Got to get it as a baselink. */ - rhs = lookup_fnfields (TYPE_BINFO (current_class_type), - DECL_NAME (OVL_FUNCTION (rhs)), 0); - } - else - { - my_friendly_assert (TREE_CHAIN (rhs) == NULL_TREE, 181); - my_friendly_assert (TREE_CODE (TREE_VALUE (rhs)) == FUNCTION_DECL - || TREE_CODE (TREE_VALUE (rhs)) == OVERLOAD, - 182); - } + my_friendly_assert (TREE_CHAIN (rhs) == NULL_TREE, 181); + my_friendly_assert (TREE_CODE (TREE_VALUE (rhs)) == FUNCTION_DECL + || TREE_CODE (TREE_VALUE (rhs)) == OVERLOAD, + 182); for (baselink = rhs; baselink; baselink = next_baselink (baselink)) |