]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
lex.c (do_identifier): If we find a hidden type after a global was selected already...
authorMartin v. Loewis <martin@mira.isdn.cs.tu-berlin.de>
Wed, 11 Aug 1999 18:36:44 +0000 (18:36 +0000)
committerMartin v. Löwis <loewis@gcc.gnu.org>
Wed, 11 Aug 1999 18:36:44 +0000 (18:36 +0000)
* lex.c (do_identifier): If we find a hidden type after a global
was selected already, continue using the global

From-SVN: r28673

gcc/cp/ChangeLog
gcc/cp/lex.c

index 7c9b8b01bd77840caad086b62f5dbe76a6a25759..93588427247f1485809bd2c04ade74d05929296f 100644 (file)
@@ -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
index 13b5b530e76be96ea5029c66c14558f703398773..d9f2262f69d3f82f962a24e86d021d609be70900 100644 (file)
@@ -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