diff options
author | zack <zack@138bc75d-0d04-0410-961f-82ee72b054a4> | 2004-03-28 17:45:57 +0000 |
---|---|---|
committer | zack <zack@138bc75d-0d04-0410-961f-82ee72b054a4> | 2004-03-28 17:45:57 +0000 |
commit | 56533c318826e7fb56f505d0b2621ed01f66135e (patch) | |
tree | e95abdb07c80f3f34dfb27ad9081ce47469bc52a /gcc/c-tree.h | |
parent | c36be2669af355c163234290a878b04ce89d2afe (diff) | |
download | gcc-56533c318826e7fb56f505d0b2621ed01f66135e.tar.gz |
* c-decl.c: Verify that C_SIZEOF_STRUCT_LANG_IDENTIFIER is correct.
(struct c_binding, struct c_scope): Add chain_next
attributes to GTY markers.
(struct lang_identifier, struct lang_tree_node): Define
here...
* c-tree.h: ... not here. No longer need to declare struct
c_binding either. Do define C_SIZEOF_STRUCT_LANG_IDENTIFIER.
* c-lang.c, objc/objc-lang.c: Set LANG_HOOKS_IDENTIFIER_SIZE
to C_SIZEOF_STRUCT_LANG_IDENTIFIER.
PR 14734, 11944
* c-decl.c (get_parm_info): If error_mark_node is encountered
in the bindings chain, unbind and discard it; don't abort.
* testsuite/gcc.dg/noncompile/undeclared-2.c: New test.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@80042 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/c-tree.h')
-rw-r--r-- | gcc/c-tree.h | 32 |
1 files changed, 4 insertions, 28 deletions
diff --git a/gcc/c-tree.h b/gcc/c-tree.h index eb167ca050e..01f86e999f2 100644 --- a/gcc/c-tree.h +++ b/gcc/c-tree.h @@ -24,34 +24,10 @@ Software Foundation, 59 Temple Place - Suite 330, Boston, MA #include "c-common.h" -/* Each C symbol points to three linked lists of c_binding structures. - These describe the values of the identifier in the three different - namespaces defined by the language. The contents of these lists - are private to c-decl.c. */ - -struct c_binding; - -/* Language-dependent contents of an identifier. */ - -struct lang_identifier GTY(()) -{ - struct c_common_identifier common_id; - struct c_binding *symbol_binding; /* vars, funcs, constants, typedefs */ - struct c_binding *tag_binding; /* struct/union/enum tags */ - struct c_binding *label_binding; /* labels */ -}; - -/* The resulting tree type. */ - -union lang_tree_node - GTY((desc ("TREE_CODE (&%h.generic) == IDENTIFIER_NODE"), - chain_next ("TREE_CODE (&%h.generic) == INTEGER_TYPE ? (union lang_tree_node *)TYPE_NEXT_VARIANT (&%h.generic) : (union lang_tree_node *)TREE_CHAIN (&%h.generic)"))) -{ - union tree_node GTY ((tag ("0"), - desc ("tree_node_structure (&%h)"))) - generic; - struct lang_identifier GTY ((tag ("1"))) identifier; -}; +/* struct lang_identifier is private to c-decl.c, but langhooks.c needs to + know how big it is. This is sanity-checked in c-decl.c. */ +#define C_SIZEOF_STRUCT_LANG_IDENTIFIER \ + (sizeof (struct c_common_identifier) + 3 * sizeof (void *)) /* Language-specific declaration information. */ |