diff mbox

[8/10] debug-early merge: Objective-C front-end

Message ID 554C058A.5050002@redhat.com
State New
Headers show

Commit Message

Aldy Hernandez May 8, 2015, 12:38 a.m. UTC

Comments

Mike Stump May 8, 2015, 5:47 p.m. UTC | #1
On May 7, 2015, at 5:38 PM, Aldy Hernandez <aldyh@redhat.com> wrote:

Ok.
diff mbox

Patch

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.

diff --git a/gcc/objc/objc-act.c b/gcc/objc/objc-act.c
index 718fdf0..3528c89 100644
--- a/gcc/objc/objc-act.c
+++ b/gcc/objc/objc-act.c
@@ -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)
 {
diff --git a/gcc/objc/objc-gnu-runtime-abi-01.c b/gcc/objc/objc-gnu-runtime-abi-01.c
index b096fb9..cdf77b2 100644
--- a/gcc/objc/objc-gnu-runtime-abi-01.c
+++ b/gcc/objc/objc-gnu-runtime-abi-01.c
@@ -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);
 }