From: Martin v. Loewis Date: Wed, 11 Aug 1999 18:36:44 +0000 (+0000) Subject: lex.c (do_identifier): If we find a hidden type after a global was selected already... X-Git-Tag: releases/gcc-2.95.1~7 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=8d06623ae832f12963387028baa3a86adcdf4dfd;p=thirdparty%2Fgcc.git lex.c (do_identifier): If we find a hidden type after a global was selected already... * lex.c (do_identifier): If we find a hidden type after a global was selected already, continue using the global From-SVN: r28673 --- diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index 7c9b8b01bd77..93588427247f 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,3 +1,8 @@ +1999-08-11 Martin v. Loewis + + * 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 * decl2.c (set_decl_namespace): Do not complain about non-matching diff --git a/gcc/cp/lex.c b/gcc/cp/lex.c index 13b5b530e76b..d9f2262f69d3 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