gcc/objc/
* objc-act.c (objc_write_global_declarations): Adjust comment.
* objc-gnu-runtime-abi-01.c (build_selector_table_decl): Set
TREE_USED bit.
@@ -439,8 +439,7 @@ objc_init (void)
return true;
}
-/* This is called automatically (at the very end of compilation) by
- c_write_global_declarations and cp_write_global_declarations. */
+/* This is called at the end of parsing by the C/C++ parsers. */
void
objc_write_global_declarations (void)
{
@@ -500,6 +500,8 @@ build_selector_table_decl (void)
temp = build_array_type (objc_selector_template, NULL_TREE);
UOBJC_SELECTOR_TABLE_decl = start_var_decl (temp, "_OBJC_SELECTOR_TABLE");
+ /* Squash `defined but not used' warning check_global_declaration. */
+ TREE_USED (UOBJC_SELECTOR_TABLE_decl) = 1;
OBJCMETA (UOBJC_SELECTOR_TABLE_decl, objc_meta, meta_base);
}