+2002-02-20 Alexandre Oliva <aoliva@redhat.com>
+
+ * c-decl.c (pushdecl): If no global declaration is found for an
+ extern declaration in block scope, try a limbo one.
+
2002-02-20 Jakub Jelinek <jakub@redhat.com>
PR c++/4401
not errors. X11 for instance depends on this. */
if (! t && DECL_EXTERNAL (x) && TREE_PUBLIC (x) && ! flag_traditional)
{
- t = lookup_name (name);
+ t = IDENTIFIER_GLOBAL_VALUE (name);
/* Type decls at global scope don't conflict with externs declared
inside lexical blocks. */
- if (t && TREE_CODE (t) == TYPE_DECL)
- t = 0;
+ if (! t || TREE_CODE (t) == TYPE_DECL)
+ /* If there's no visible global declaration, try for an
+ invisible one. */
+ t = IDENTIFIER_LIMBO_VALUE (name);
different_binding_level = 1;
}
if (t != 0 && t == error_mark_node)