]> git.eshelyaron.com Git - emacs.git/commitdiff
(pure, staticvec): Initialize these arrays to nonzero, so that they're
authorPaul Eggert <eggert@twinsun.com>
Mon, 14 Jul 2003 05:37:52 +0000 (05:37 +0000)
committerPaul Eggert <eggert@twinsun.com>
Mon, 14 Jul 2003 05:37:52 +0000 (05:37 +0000)
not put into BSS by that optimization.

src/alloc.c

index cffd0408e249f40accbd44930443ab53197061a1..18770929532aa0132dc36dfc55c6547ea4cd4722 100644 (file)
@@ -185,9 +185,10 @@ Lisp_Object Vmemory_full;
 
 #ifndef HAVE_SHM
 
-/* Force it into data space! */
+/* Force it into data space!  Initialize it to a nonzero value;
+   otherwise some compilers put it into BSS.  */
 
-EMACS_INT pure[PURESIZE / sizeof (EMACS_INT)] = {0,};
+EMACS_INT pure[PURESIZE / sizeof (EMACS_INT)] = {1,};
 #define PUREBEG (char *) pure
 
 #else /* HAVE_SHM */
@@ -404,10 +405,11 @@ static void check_gcpros P_ ((void));
 
 struct gcpro *gcprolist;
 
-/* Addresses of staticpro'd variables.  */
+/* Addresses of staticpro'd variables.  Initialize it to a nonzero
+   value; otherwise some compilers put it into BSS.  */
 
 #define NSTATICS 1280
-Lisp_Object *staticvec[NSTATICS] = {0};
+Lisp_Object *staticvec[NSTATICS] = {&Vpurify_flag};
 
 /* Index of next unused slot in staticvec.  */