aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGeoffrey Keating <geoffk@redhat.com>2002-04-27 19:39:35 +0000
committerGeoffrey Keating <geoffk@redhat.com>2002-04-27 19:39:35 +0000
commit83aa17a87de94cdf9ccabc33e5c5ae3ff027b191 (patch)
tree547fb2132f5fb60e19cfead11ee6c6ea43f4b8ba
parenta08deac8f0ff2dbc941d270eefd755f5e6c0a9a8 (diff)
* c-common.h (struct language_function): Use gengtype.
(struct c_lang_decl): Likewise. * c-tree.h (struct lang_decl): Likewise. (struct lang_type): Likewise. * c-decl.c (lang_mark_tree): Use generated marker routines to mark tree language substructures. git-svn-id: https://gcc.gnu.org/svn/gcc/branches/pch-branch@52833 138bc75d-0d04-0410-961f-82ee72b054a4
-rw-r--r--gcc/ChangeLog9
-rw-r--r--gcc/c-common.h4
-rw-r--r--gcc/c-decl.c12
-rw-r--r--gcc/c-tree.h6
4 files changed, 18 insertions, 13 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index f2ee4773860..c0be7518b46 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,12 @@
+2002-04-27 Geoffrey Keating <geoffk@redhat.com>
+
+ * c-common.h (struct language_function): Use gengtype.
+ (struct c_lang_decl): Likewise.
+ * c-tree.h (struct lang_decl): Likewise.
+ (struct lang_type): Likewise.
+ * c-decl.c (lang_mark_tree): Use generated marker routines to mark
+ tree language substructures.
+
2002-04-25 Geoffrey Keating <geoffk@redhat.com>
* stringpool.c (mark_ident): Replace ggc_mark_nonnull_tree with
diff --git a/gcc/c-common.h b/gcc/c-common.h
index 10244fde7ff..6a0f6f3397d 100644
--- a/gcc/c-common.h
+++ b/gcc/c-common.h
@@ -281,7 +281,7 @@ typedef struct stmt_tree_s *stmt_tree;
/* Global state pertinent to the current function. Some C dialects
extend this structure with additional fields. */
-struct language_function {
+struct language_function GTY(()) {
/* While we are parsing the function, this contains information
about the statement-tree that we are building. */
struct stmt_tree_s x_stmt_tree;
@@ -353,7 +353,7 @@ extern void c_finish_while_stmt_cond PARAMS ((tree, tree));
structure for FUNCTION_DECLs; all other DECLs have a NULL
DECL_LANG_SPECIFIC field. */
-struct c_lang_decl {
+struct c_lang_decl GTY(()) {
unsigned declared_inline : 1;
};
diff --git a/gcc/c-decl.c b/gcc/c-decl.c
index d3baaae84e7..8390e515a65 100644
--- a/gcc/c-decl.c
+++ b/gcc/c-decl.c
@@ -7113,14 +7113,10 @@ lang_mark_tree (t)
ggc_mark_tree (i->error_locus);
ggc_mark_tree (i->limbo_value);
}
- else if (TYPE_P (t) && TYPE_LANG_SPECIFIC (t))
- ggc_mark (TYPE_LANG_SPECIFIC (t));
- else if (DECL_P (t) && DECL_LANG_SPECIFIC (t))
- {
- ggc_mark (DECL_LANG_SPECIFIC (t));
- c_mark_lang_decl (&DECL_LANG_SPECIFIC (t)->base);
- ggc_mark_tree (DECL_LANG_SPECIFIC (t)->pending_sizes);
- }
+ else if (TYPE_P (t))
+ gt_ggc_m_lang_type (TYPE_LANG_SPECIFIC (t));
+ else if (DECL_P (t))
+ gt_ggc_m_lang_decl (DECL_LANG_SPECIFIC (t));
}
/* The functions below are required for functionality of doing
diff --git a/gcc/c-tree.h b/gcc/c-tree.h
index fa052860b04..cfbfcbda901 100644
--- a/gcc/c-tree.h
+++ b/gcc/c-tree.h
@@ -43,7 +43,7 @@ struct lang_identifier
/* Language-specific declaration information. */
-struct lang_decl
+struct lang_decl GTY(())
{
struct c_lang_decl base;
/* The return types and parameter types may have variable size.
@@ -107,10 +107,10 @@ struct lang_decl
(DECL_LANG_SPECIFIC (NODE)->base.declared_inline)
/* In a RECORD_TYPE, a sorted array of the fields of the type. */
-struct lang_type
+struct lang_type GTY(())
{
int len;
- tree elts[1];
+ tree GTY((length ("%.len"))) elts[1];
};
/* Record whether a type or decl was written with nonconstant size.