aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorloewis <loewis@138bc75d-0d04-0410-961f-82ee72b054a4>1999-08-11 18:36:44 +0000
committerloewis <loewis@138bc75d-0d04-0410-961f-82ee72b054a4>1999-08-11 18:36:44 +0000
commit72165c97c4723ab9f6f11788b7c07e41a9f316f8 (patch)
tree5ad6fbca8932f5797463474632249d750c666ef1 /gcc
parent54eff2ec6bfb8d89bf294693d882c11372e490b2 (diff)
* lex.c (do_identifier): If we find a hidden type after a global
was selected already, continue using the global git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/gcc-2_95-branch@28673 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc')
-rw-r--r--gcc/cp/ChangeLog5
-rw-r--r--gcc/cp/lex.c8
2 files changed, 13 insertions, 0 deletions
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog
index 7c9b8b01bd7..93588427247 100644
--- a/gcc/cp/ChangeLog
+++ b/gcc/cp/ChangeLog
@@ -1,3 +1,8 @@
+1999-08-11 Martin v. Loewis <martin@mira.isdn.cs.tu-berlin.de>
+
+ * lex.c (do_identifier): If we find a hidden type after a global
+ was selected already, continue using the global.
+
1999-08-10 Martin v. Loewis <martin@mira.isdn.cs.tu-berlin.de>
* decl2.c (set_decl_namespace): Do not complain about non-matching
diff --git a/gcc/cp/lex.c b/gcc/cp/lex.c
index 13b5b530e76..d9f2262f69d 100644
--- a/gcc/cp/lex.c
+++ b/gcc/cp/lex.c
@@ -2869,6 +2869,14 @@ do_identifier (token, parsing, args)
|| TREE_CODE (field) == CONST_DECL
|| TREE_CODE (field) == TEMPLATE_DECL)
id = field;
+ else if (TREE_CODE (field) == TYPE_DECL
+ && DECL_ARTIFICIAL (field)
+ && IMPLICIT_TYPENAME_P (TREE_TYPE (field)))
+ /* When we did name-lookup before, we will have eschewed
+ implicit typenames in favor of global bindings. Therefore,
+ if lookup_field returns an implicit typename, but ID is not
+ an implicit typename, then we should skip this one, too. */
+ ;
else if (TREE_CODE (field) != FIELD_DECL)
my_friendly_abort (61);
else