aboutsummaryrefslogtreecommitdiff
path: root/gcc/c-pragma.c
diff options
context:
space:
mode:
authorRichard Henderson <rth@cygnus.com>1999-09-18 11:54:36 -0700
committerRichard Henderson <rth@gcc.gnu.org>1999-09-18 11:54:36 -0700
commit568767a62c1e147235e0645fe96beb533967add2 (patch)
tree873184a4e65c4fe3544f6b4689d5bacb6ebed1d7 /gcc/c-pragma.c
parent4a8021dcbd74197687a44a47e590580851eaf831 (diff)
downloadgcc-568767a62c1e147235e0645fe96beb533967add2.zip
gcc-568767a62c1e147235e0645fe96beb533967add2.tar.gz
gcc-568767a62c1e147235e0645fe96beb533967add2.tar.bz2
c-pragma.c (mark_align_stack): New.
* c-pragma.c (mark_align_stack): New. (init_pragma): New. * c-pragma.h (init_pragma): Declare it. * c-lex.c (init_parse): Call it. From-SVN: r29502
Diffstat (limited to 'gcc/c-pragma.c')
-rw-r--r--gcc/c-pragma.c24
1 files changed, 24 insertions, 0 deletions
diff --git a/gcc/c-pragma.c b/gcc/c-pragma.c
index c002587..ba0c836 100644
--- a/gcc/c-pragma.c
+++ b/gcc/c-pragma.c
@@ -512,3 +512,27 @@ handle_pragma_token (string, token)
return 1;
}
#endif /* HANDLE_GENERIC_PRAGMAS */
+
+#ifdef HANDLE_PRAGMA_PACK_PUSH_POP
+static void
+mark_align_stack (p)
+ void *p;
+{
+ align_stack *a = (align_stack *) p;
+
+ while (a)
+ {
+ ggc_mark_tree (a->id);
+ a = a->prev;
+ }
+}
+#endif
+
+void
+init_pragma ()
+{
+#ifdef HANDLE_PRAGMA_PACK_PUSH_POP
+ ggc_add_root (&alignment_stack, 1, sizeof(alignment_stack),
+ mark_align_stack);
+#endif
+}