diff -urN gcc-4.0-20050130/gcc/c-common.c gcc-4.0-20050130-new/gcc/c-common.c --- gcc-4.0-20050130/gcc/c-common.c Sat Jan 29 17:12:33 2005 +++ gcc-4.0-20050130-new/gcc/c-common.c Mon Feb 7 00:16:44 2005 @@ -5204,7 +5204,7 @@ *no_add_attrs = true; return NULL_TREE; } - cleanup_decl = lookup_name (cleanup_id); + cleanup_decl = lookup_name (cleanup_id, 0); if (!cleanup_decl || TREE_CODE (cleanup_decl) != FUNCTION_DECL) { error ("cleanup argument not a function"); diff -urN gcc-4.0-20050130/gcc/c-decl.c gcc-4.0-20050130-new/gcc/c-decl.c --- gcc-4.0-20050130/gcc/c-decl.c Sat Jan 29 17:12:37 2005 +++ gcc-4.0-20050130-new/gcc/c-decl.c Mon Feb 7 00:28:46 2005 @@ -2457,7 +2457,7 @@ /*invisible=*/false, /*nested=*/false); } - if (warn_traditional && !in_system_header && lookup_name (name)) + if (warn_traditional && !in_system_header && lookup_name (name, 0)) warning ("%Htraditional C lacks a separate namespace for labels, " "identifier %qs conflicts", &location, IDENTIFIER_POINTER (name)); @@ -2537,7 +2537,7 @@ or return 0 if it is undefined. */ tree -lookup_name (tree name) +lookup_name (tree name, ATTRIBUTE_UNUSED int scope) { struct c_binding *b = I_SYMBOL_BINDING (name); if (b && !b->invisible) @@ -3387,7 +3387,7 @@ if (attr) { tree cleanup_id = TREE_VALUE (TREE_VALUE (attr)); - tree cleanup_decl = lookup_name (cleanup_id); + tree cleanup_decl = lookup_name (cleanup_id, 0); tree cleanup; /* Build "cleanup(&decl)" for the destructor. */ @@ -4564,7 +4564,7 @@ if (extern_ref && current_scope != file_scope) { tree global_decl = identifier_global_value (declarator->u.id); - tree visible_decl = lookup_name (declarator->u.id); + tree visible_decl = lookup_name (declarator->u.id, 0); if (global_decl && global_decl != visible_decl @@ -7059,7 +7059,7 @@ } else if (TREE_CODE (type) == IDENTIFIER_NODE) { - tree t = lookup_name (type); + tree t = lookup_name (type, 0); if (!t || TREE_CODE (t) != TYPE_DECL) error ("%qs fails to be a typedef or built in type", IDENTIFIER_POINTER (type)); diff -urN gcc-4.0-20050130/gcc/c-parse.in gcc-4.0-20050130-new/gcc/c-parse.in --- gcc-4.0-20050130/gcc/c-parse.in Wed Jan 5 18:08:35 2005 +++ gcc-4.0-20050130-new/gcc/c-parse.in Mon Feb 7 00:18:46 2005 @@ -1271,7 +1271,7 @@ { /* For a typedef name, record the meaning, not the name. In case of `foo foo, bar;'. */ $$.kind = ctsk_typedef; - $$.spec = lookup_name ($1); } + $$.spec = lookup_name ($1, 0); } @@ifobjc | CLASSNAME protocolrefs { $$.kind = ctsk_objc; @@ -3379,7 +3379,7 @@ } } - decl = lookup_name (yylval.ttype); + decl = lookup_name (yylval.ttype, 0); if (decl) { if (TREE_CODE (decl) == TYPE_DECL) diff -urN gcc-4.0-20050130/gcc/c-tree.h gcc-4.0-20050130-new/gcc/c-tree.h --- gcc-4.0-20050130/gcc/c-tree.h Tue Jan 18 12:36:00 2005 +++ gcc-4.0-20050130-new/gcc/c-tree.h Mon Feb 7 00:19:13 2005 @@ -388,7 +388,7 @@ extern tree grokparm (const struct c_parm *); extern tree implicitly_declare (tree); extern void keep_next_level (void); -extern tree lookup_name (tree); +extern tree lookup_name (tree, int); extern void pending_xref_error (void); extern void c_push_function_context (struct function *); extern void c_pop_function_context (struct function *); diff -urN gcc-4.0-20050130/gcc/c-typeck.c gcc-4.0-20050130-new/gcc/c-typeck.c --- gcc-4.0-20050130/gcc/c-typeck.c Sat Jan 29 17:12:38 2005 +++ gcc-4.0-20050130-new/gcc/c-typeck.c Mon Feb 7 00:19:53 2005 @@ -1746,7 +1746,7 @@ build_external_ref (tree id, int fun) { tree ref; - tree decl = lookup_name (id); + tree decl = lookup_name (id, 0); /* In Objective-C, an instance variable (ivar) may be preferred to whatever lookup_name() found. */ diff -urN gcc-4.0-20050130/gcc/config/darwin-c.c gcc-4.0-20050130-new/gcc/config/darwin-c.c --- gcc-4.0-20050130/gcc/config/darwin-c.c Wed Nov 24 18:47:13 2004 +++ gcc-4.0-20050130-new/gcc/config/darwin-c.c Mon Feb 7 00:20:17 2005 @@ -140,7 +140,7 @@ tok = c_lex (&decl); if (tok == CPP_NAME && decl) { - tree local = lookup_name (decl); + tree local = lookup_name (decl, 0); if (local && (TREE_CODE (local) == PARM_DECL || TREE_CODE (local) == VAR_DECL)) TREE_USED (local) = 1; diff -urN gcc-4.0-20050130/gcc/java/decl.c gcc-4.0-20050130-new/gcc/java/decl.c --- gcc-4.0-20050130/gcc/java/decl.c Mon Jan 24 20:07:06 2005 +++ gcc-4.0-20050130-new/gcc/java/decl.c Mon Feb 7 00:42:40 2005 @@ -1162,7 +1162,7 @@ or return 0 if it is undefined. */ tree -lookup_name (tree name) +lookup_name (tree name, ATTRIBUTE_UNUSED int scope) { tree val; if (current_binding_level != global_binding_level diff -urN gcc-4.0-20050130/gcc/java/java-tree.h gcc-4.0-20050130-new/gcc/java/java-tree.h --- gcc-4.0-20050130/gcc/java/java-tree.h Mon Jan 24 20:07:06 2005 +++ gcc-4.0-20050130-new/gcc/java/java-tree.h Mon Feb 7 00:34:07 2005 @@ -1252,7 +1287,7 @@ extern tree check_for_builtin (tree, tree); extern void initialize_builtins (void); -extern tree lookup_name (tree); +extern tree lookup_name (tree, int); extern tree build_known_method_ref (tree, tree, tree, tree, tree); extern tree build_class_init (tree, tree); extern int attach_init_test_initialization_flags (void **, void *); diff -urN gcc-4.0-20050130/gcc/objc/objc-act.c gcc-4.0-20050130-new/gcc/objc/objc-act.c --- gcc-4.0-20050130/gcc/objc/objc-act.c Sat Jan 29 13:16:34 2005 +++ gcc-4.0-20050130-new/gcc/objc/objc-act.c Mon Feb 7 00:21:20 2005 @@ -1354,7 +1354,7 @@ sprintf (name, STRING_OBJECT_GLOBAL_FORMAT, constant_string_class_name); constant_string_global_id = get_identifier (name); - string_class_decl = lookup_name (constant_string_global_id); + string_class_decl = lookup_name (constant_string_global_id, 0); return string_class_decl; } @@ -2703,7 +2703,8 @@ if (! objc_is_class_name (ident)) { - tree record = lookup_name (ident), type = record; + tree record = lookup_name (ident, 0); + tree type = record; if (record) { @@ -6694,12 +6695,12 @@ super_name = NULL_TREE; } - CLASS_NAME (class) = class_name; - CLASS_SUPER_NAME (class) = super_name; - CLASS_CLS_METHODS (class) = NULL_TREE; + CLASS_NAME (class) = class_name; + CLASS_SUPER_NAME (class) = super_name; + CLASS_CLS_METHODS (class) = NULL_TREE; if (! objc_is_class_name (class_name) - && (decl = lookup_name (class_name))) + && (decl = lookup_name (class_name, 0))) { error ("%qs redeclared as different kind of symbol", IDENTIFIER_POINTER (class_name));