aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorRichard Stallman <rms@gnu.org>1992-08-19 02:49:35 +0000
committerRichard Stallman <rms@gnu.org>1992-08-19 02:49:35 +0000
commit741be22fac7f944131ef30b42e55089128c2065b (patch)
treeb2071db1bf1fd55220166b0435ac7eefcb8a6427 /gcc
parenta8ccbf53240fc86da9d29c40fa32287c210b0aff (diff)
downloadgcc-741be22fac7f944131ef30b42e55089128c2065b.zip
gcc-741be22fac7f944131ef30b42e55089128c2065b.tar.gz
gcc-741be22fac7f944131ef30b42e55089128c2065b.tar.bz2
(build_selector_translation_table): NULL-terminate the selector list.
(build_selector_translation_table): NULL-terminate the selector list. Mark _OBJC_SELECTOR_REFERENCES_decl as static, not extern. From-SVN: r1892
Diffstat (limited to 'gcc')
-rw-r--r--gcc/objc/objc-act.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/gcc/objc/objc-act.c b/gcc/objc/objc-act.c
index e5d271c..4be7fe7 100644
--- a/gcc/objc/objc-act.c
+++ b/gcc/objc/objc-act.c
@@ -1154,6 +1154,11 @@ build_selector_translation_table ()
}
#ifdef OBJC_SELECTORS_WITHOUT_LABELS
+ /* Cause the variable and its initial value to be actually output. */
+ DECL_EXTERNAL (_OBJC_SELECTOR_REFERENCES_decl) = 0;
+ TREE_STATIC (_OBJC_SELECTOR_REFERENCES_decl) = 1;
+ /* NULL terminate the list and fix the decl for output. */
+ initlist = tree_cons (NULLT, build_int_2 (0, 0), initlist);
DECL_INITIAL (_OBJC_SELECTOR_REFERENCES_decl) = (tree) 1;
initlist = build_nt (CONSTRUCTOR, NULLT, nreverse (initlist));
finish_decl (_OBJC_SELECTOR_REFERENCES_decl, initlist, NULLT);