aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrendan Kehoe <brendan@lisa.cygnus.com>1994-09-27 17:35:24 +0000
committerBrendan Kehoe <brendan@gcc.gnu.org>1994-09-27 13:35:24 -0400
commit3a19bc1cdc4995407a68fcb0439026995b838a6a (patch)
treeab8d9bfc3182f27763162681a0216cbc4522ba38
parentdab0a79e6a8a8bfb0a435476bde8abffda624b71 (diff)
downloadgcc-3a19bc1cdc4995407a68fcb0439026995b838a6a.zip
gcc-3a19bc1cdc4995407a68fcb0439026995b838a6a.tar.gz
gcc-3a19bc1cdc4995407a68fcb0439026995b838a6a.tar.bz2
search.c (lookup_field): Return a NULL_TREE if XBASETYPE is itself null.
* search.c (lookup_field): Return a NULL_TREE if XBASETYPE is itself null. From-SVN: r8143
-rw-r--r--gcc/cp/ChangeLog5
-rw-r--r--gcc/cp/search.c4
2 files changed, 9 insertions, 0 deletions
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog
index 2515e5c..286c8cc 100644
--- a/gcc/cp/ChangeLog
+++ b/gcc/cp/ChangeLog
@@ -1,3 +1,8 @@
+Tue Sep 27 10:18:57 1994 Brendan Kehoe (brendan@lisa.cygnus.com)
+
+ * search.c (lookup_field): Return a NULL_TREE if XBASETYPE is
+ itself null.
+
Wed Sep 14 10:17:27 1994 Michael I Bushnell <mib@churchy.gnu.ai.mit.edu>
* g++.c: Include <sys/errno.h> in case `errno' is a macro
diff --git a/gcc/cp/search.c b/gcc/cp/search.c
index 6623ab4..bd4f043 100644
--- a/gcc/cp/search.c
+++ b/gcc/cp/search.c
@@ -1031,6 +1031,10 @@ lookup_field (xbasetype, name, protect, want_type)
accurate error messages for access control. */
int index = MEMOIZED_HASH_FN (name);
+ /* We sometimes go looking with XBASETYPE pre-set to null. */
+ if (xbasetype == NULL_TREE)
+ return NULL_TREE;
+
/* If we are looking for a constructor in a templated type, use the
unspecialized name, as that is how we store it. */
if (IDENTIFIER_TEMPLATE (name))