Commit 3704ef74 by Alexandre Oliva Committed by Alexandre Oliva

c-decl.c (pushdecl): If no global declaration is found for an extern declaration in block scope...

* c-decl.c (pushdecl): If no global declaration is found for an
extern declaration in block scope, try a limbo one.

From-SVN: r49917
parent 7552da58
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
......
......@@ -2199,11 +2199,13 @@ pushdecl (x)
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)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment