diff options
Diffstat (limited to 'gcc/c-decl.c')
-rw-r--r-- | gcc/c-decl.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/gcc/c-decl.c b/gcc/c-decl.c index 6e7c3ca78c0..23c37ef8d93 100644 --- a/gcc/c-decl.c +++ b/gcc/c-decl.c @@ -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) |