aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTaras Glek <tglek@mozilla.com>2009-04-22 18:29:36 +0000
committerDiego Novillo <dnovillo@google.com>2009-04-22 18:29:36 +0000
commit216beacb69e5ee8bd76b72809779aa9c154b6bc4 (patch)
treec5c412bca065fddee835089ec9fbd863ee283f18
parentb2792265c82af14e93bee741ddb424b99d035a06 (diff)
2009-04-21 Taras Glek <tglek@mozilla.com>
* include/hashtab.h: Update GTY annotations to new syntax * include/splay-tree.h: Likewise gcc/ChangeLog 2009-04-21 Taras Glek <tglek@mozilla.com> * alias.c: Update GTY annotations to new syntax * basic-block.h: Likewise * bitmap.h: Likewise * c-common.h: Likewise * c-decl.c: Likewise * c-parser.c: Likewise * c-pragma.c: Likewise * c-tree.h: Likewise * cfgloop.h: Likewise * cgraph.h: Likewise * config/alpha/alpha.c: Likewise * config/arm/arm.h: Likewise * config/avr/avr.h: Likewise * config/bfin/bfin.c: Likewise * config/cris/cris.c: Likewise * config/darwin.c: Likewise * config/frv/frv.c: Likewise * config/i386/i386.c: Likewise * config/i386/i386.h: Likewise * config/i386/winnt.c: Likewise * config/ia64/ia64.h: Likewise * config/iq2000/iq2000.c: Likewise * config/mips/mips.c: Likewise * config/mmix/mmix.h: Likewise * config/pa/pa.c: Likewise * config/pa/pa.h: Likewise * config/rs6000/rs6000.c: Likewise * config/s390/s390.c: Likewise * config/sparc/sparc.c: Likewise * config/xtensa/xtensa.c: Likewise * cselib.h: Likewise * dbxout.c: Likewise * dwarf2out.c: Likewise * except.c: Likewise * except.h: Likewise * fixed-value.h: Likewise * function.c: Likewise * function.h: Likewise * gimple.h: Likewise * integrate.c: Likewise * optabs.c: Likewise * output.h: Likewise * real.h: Likewise * rtl.h: Likewise * stringpool.c: Likewise * tree-data-ref.c: Likewise * tree-flow.h: Likewise * tree-scalar-evolution.c: Likewise * tree-ssa-address.c: Likewise * tree-ssa-alias.h: Likewise * tree-ssa-operands.h: Likewise * tree.c: Likewise * tree.h: Likewise * varasm.c: Likewise * varray.h: Likewise * vec.h: Likewise * coretypes.h: Do not define GTY macro if it is already defined * doc/gty.texi: Update GTY documentation to new syntax * gengtype-lex.l: Enforce attribute-like syntax for GTY annotations on structs * gengtype-parse.c: Likewise gcc/ada/ChangeLog 2009-04-21 Taras Glek <tglek@mozilla.com> * gcc-interface/ada-tree.h: Update GTY annotations to new syntax * gcc-interface/trans.c: Likewise * gcc-interface/utils.c: Likewise gcc/cp/ChangeLog 2009-04-21 Taras Glek <tglek@mozilla.com> * cp-tree.h: Update GTY annotations to new syntax * decl.c: Likewise * mangle.c: Likewise * name-lookup.c: Likewise * name-lookup.h: Likewise * parser.c: Likewise * pt.c: Likewise * rtti.c: Likewise * semantics.c: Likewise * typeck2.c: Likewise gcc/fortran/ChangeLog 2009-04-21 Taras Glek <tglek@mozilla.com> * f95-lang.c: Update GTY annotations to new syntax * trans-intrinsic.c: Likewise * trans-io.c: Likewise * trans.h: Likewise gcc/java/ChangeLog 2009-04-21 Taras Glek <tglek@mozilla.com> * builtins.c: Update GTY annotations to new syntax * decl.c: Likewise * java-tree.h: Likewise * jcf.h: Likewise * lang.c: Likewise gcc/objc/ChangeLog 2009-04-21 Taras Glek <tglek@mozilla.com> * objc-act.c: Update GTY annotations to new syntax * objc-act.h: Likewise libcpp/ChangeLog 2009-04-21 Taras Glek <tglek@mozilla.com> * include/cpp-id-data.h: Update GTY annotations to new syntax * include/cpplib.h: Likewise * include/line-map.h: Likewise * include/symtab.h: Likewise git-svn-id: https://gcc.gnu.org/svn/gcc/trunk@146607 138bc75d-0d04-0410-961f-82ee72b054a4
-rw-r--r--ChangeLog5
-rw-r--r--gcc/ChangeLog65
-rw-r--r--gcc/ada/ChangeLog6
-rw-r--r--gcc/ada/gcc-interface/ada-tree.h9
-rw-r--r--gcc/ada/gcc-interface/trans.c10
-rw-r--r--gcc/ada/gcc-interface/utils.c3
-rw-r--r--gcc/alias.c3
-rw-r--r--gcc/basic-block.h15
-rw-r--r--gcc/bitmap.h8
-rw-r--r--gcc/c-common.h10
-rw-r--r--gcc/c-decl.c16
-rw-r--r--gcc/c-parser.c6
-rw-r--r--gcc/c-pragma.c12
-rw-r--r--gcc/c-tree.h9
-rw-r--r--gcc/cfgloop.h15
-rw-r--r--gcc/cgraph.h25
-rw-r--r--gcc/config/alpha/alpha.c8
-rw-r--r--gcc/config/arm/arm.h4
-rw-r--r--gcc/config/avr/avr.h2
-rw-r--r--gcc/config/bfin/bfin.c4
-rw-r--r--gcc/config/cris/cris.c2
-rw-r--r--gcc/config/darwin.c2
-rw-r--r--gcc/config/frv/frv.c2
-rw-r--r--gcc/config/i386/i386.c6
-rw-r--r--gcc/config/i386/i386.h3
-rw-r--r--gcc/config/i386/winnt.c4
-rw-r--r--gcc/config/ia64/ia64.h2
-rw-r--r--gcc/config/iq2000/iq2000.c2
-rw-r--r--gcc/config/mips/mips.c8
-rw-r--r--gcc/config/mmix/mmix.h2
-rw-r--r--gcc/config/pa/pa.c4
-rw-r--r--gcc/config/pa/pa.h2
-rw-r--r--gcc/config/rs6000/rs6000.c4
-rw-r--r--gcc/config/s390/s390.c4
-rw-r--r--gcc/config/sparc/sparc.c2
-rw-r--r--gcc/config/xtensa/xtensa.c2
-rw-r--r--gcc/coretypes.h2
-rw-r--r--gcc/cp/ChangeLog13
-rw-r--r--gcc/cp/cp-tree.h74
-rw-r--r--gcc/cp/decl.c6
-rw-r--r--gcc/cp/mangle.c3
-rw-r--r--gcc/cp/name-lookup.c3
-rw-r--r--gcc/cp/name-lookup.h15
-rw-r--r--gcc/cp/parser.c18
-rw-r--r--gcc/cp/pt.c2
-rw-r--r--gcc/cp/rtti.c3
-rw-r--r--gcc/cp/semantics.c3
-rw-r--r--gcc/cp/typeck2.c3
-rw-r--r--gcc/cselib.h9
-rw-r--r--gcc/dbxout.c3
-rw-r--r--gcc/doc/gty.texi8
-rw-r--r--gcc/dwarf2out.c70
-rw-r--r--gcc/except.c8
-rw-r--r--gcc/except.h7
-rw-r--r--gcc/fixed-value.h2
-rw-r--r--gcc/fortran/ChangeLog7
-rw-r--r--gcc/fortran/f95-lang.c20
-rw-r--r--gcc/fortran/trans-intrinsic.c3
-rw-r--r--gcc/fortran/trans-io.c6
-rw-r--r--gcc/fortran/trans.h12
-rw-r--r--gcc/function.c6
-rw-r--r--gcc/function.h27
-rw-r--r--gcc/gengtype-lex.l3
-rw-r--r--gcc/gengtype-parse.c61
-rw-r--r--gcc/gimple.h76
-rw-r--r--gcc/integrate.c4
-rw-r--r--gcc/java/ChangeLog8
-rw-r--r--gcc/java/builtins.c6
-rw-r--r--gcc/java/decl.c4
-rw-r--r--gcc/java/java-tree.h28
-rw-r--r--gcc/java/jcf.h6
-rw-r--r--gcc/java/lang.c3
-rw-r--r--gcc/objc/ChangeLog5
-rw-r--r--gcc/objc/objc-act.c9
-rw-r--r--gcc/objc/objc-act.h9
-rw-r--r--gcc/optabs.c3
-rw-r--r--gcc/opth-gen.awk4
-rw-r--r--gcc/output.h11
-rw-r--r--gcc/real.h3
-rw-r--r--gcc/rtl.h17
-rw-r--r--gcc/stringpool.c3
-rw-r--r--gcc/tree-data-ref.c2
-rw-r--r--gcc/tree-flow.h29
-rw-r--r--gcc/tree-scalar-evolution.c3
-rw-r--r--gcc/tree-ssa-address.c3
-rw-r--r--gcc/tree-ssa-alias.h2
-rw-r--r--gcc/tree-ssa-operands.h5
-rw-r--r--gcc/tree.c3
-rw-r--r--gcc/tree.h143
-rw-r--r--gcc/varasm.c15
-rw-r--r--gcc/varray.h4
-rw-r--r--gcc/vec.h4
-rw-r--r--include/hashtab.h3
-rw-r--r--include/splay-tree.h6
-rw-r--r--libcpp/ChangeLog7
-rw-r--r--libcpp/include/cpp-id-data.h6
-rw-r--r--libcpp/include/cpplib.h12
-rw-r--r--libcpp/include/line-map.h6
-rw-r--r--libcpp/include/symtab.h3
99 files changed, 510 insertions, 628 deletions
diff --git a/ChangeLog b/ChangeLog
index b8737ccb1d3..43ccf019878 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2009-04-21 Taras Glek <tglek@mozilla.com>
+
+ * include/hashtab.h: Update GTY annotations to new syntax
+ * include/splay-tree.h: Likewise
+
2009-04-17 Ben Elliston <bje@au.ibm.com>
* config.sub, config.guess: Update from upstream sources.
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index f281bd03dd8..379a7b56083 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,68 @@
+2009-04-21 Taras Glek <tglek@mozilla.com>
+
+ * alias.c: Update GTY annotations to new syntax.
+ * basic-block.h: Likewise.
+ * bitmap.h: Likewise.
+ * c-common.h: Likewise.
+ * c-decl.c: Likewise.
+ * c-parser.c: Likewise.
+ * c-pragma.c: Likewise.
+ * c-tree.h: Likewise.
+ * cfgloop.h: Likewise.
+ * cgraph.h: Likewise.
+ * config/alpha/alpha.c: Likewise.
+ * config/arm/arm.h: Likewise.
+ * config/avr/avr.h: Likewise.
+ * config/bfin/bfin.c: Likewise.
+ * config/cris/cris.c: Likewise.
+ * config/darwin.c: Likewise.
+ * config/frv/frv.c: Likewise.
+ * config/i386/i386.c: Likewise.
+ * config/i386/i386.h: Likewise.
+ * config/i386/winnt.c: Likewise.
+ * config/ia64/ia64.h: Likewise.
+ * config/iq2000/iq2000.c: Likewise.
+ * config/mips/mips.c: Likewise.
+ * config/mmix/mmix.h: Likewise.
+ * config/pa/pa.c: Likewise.
+ * config/pa/pa.h: Likewise.
+ * config/rs6000/rs6000.c: Likewise.
+ * config/s390/s390.c: Likewise.
+ * config/sparc/sparc.c: Likewise.
+ * config/xtensa/xtensa.c: Likewise.
+ * cselib.h: Likewise.
+ * dbxout.c: Likewise.
+ * dwarf2out.c: Likewise.
+ * except.c: Likewise.
+ * except.h: Likewise.
+ * fixed-value.h: Likewise.
+ * function.c: Likewise.
+ * function.h: Likewise.
+ * gimple.h: Likewise.
+ * integrate.c: Likewise.
+ * optabs.c: Likewise.
+ * output.h: Likewise.
+ * real.h: Likewise.
+ * rtl.h: Likewise.
+ * stringpool.c: Likewise.
+ * tree-data-ref.c: Likewise.
+ * tree-flow.h: Likewise.
+ * tree-scalar-evolution.c: Likewise.
+ * tree-ssa-address.c: Likewise.
+ * tree-ssa-alias.h: Likewise.
+ * tree-ssa-operands.h: Likewise.
+ * tree.c: Likewise.
+ * tree.h: Likewise.
+ * varasm.c: Likewise.
+ * varray.h: Likewise.
+ * vec.h: Likewise.
+ * coretypes.h: Do not define GTY macro if it is already
+ defined.
+ * doc/gty.texi: Update GTY documentation to new syntax.
+ * gengtype-lex.l: Enforce attribute-like syntax for GTY
+ annotations on structs.
+ * gengtype-parse.c: Likewise.
+
2009-04-22 Mark Heffernan <meheff@google.com>
* gcc.c (LINK_COMMAND_SPEC): Link with gcov with -fprofile-generate=.
diff --git a/gcc/ada/ChangeLog b/gcc/ada/ChangeLog
index 8d822c71132..7628abb53e2 100644
--- a/gcc/ada/ChangeLog
+++ b/gcc/ada/ChangeLog
@@ -1,3 +1,9 @@
+2009-04-21 Taras Glek <tglek@mozilla.com>
+
+ * gcc-interface/ada-tree.h: Update GTY annotations to new syntax.
+ * gcc-interface/trans.c: Likewise.
+ * gcc-interface/utils.c: Likewise.
+
2009-04-22 Ed Schonberg <schonberg@adacore.com>
* sem_res.adb: Create block around procedure call when actual is a
diff --git a/gcc/ada/gcc-interface/ada-tree.h b/gcc/ada/gcc-interface/ada-tree.h
index cd2b9703887..f26781eff0a 100644
--- a/gcc/ada/gcc-interface/ada-tree.h
+++ b/gcc/ada/gcc-interface/ada-tree.h
@@ -24,14 +24,13 @@
****************************************************************************/
/* Ada uses the lang_decl and lang_type fields to hold a tree. */
-union lang_tree_node
- GTY((desc ("0"),
- chain_next ("(union lang_tree_node *)TREE_CHAIN (&%h.t)")))
+union GTY((desc ("0"),
+ chain_next ("(union lang_tree_node *)TREE_CHAIN (&%h.t)"))) lang_tree_node
{
union tree_node GTY((tag ("0"))) t;
};
-struct lang_decl GTY(()) { tree t; };
-struct lang_type GTY(()) { tree t; };
+struct GTY(()) lang_decl {tree t; };
+struct GTY(()) lang_type {tree t; };
/* Define macros to get and set the tree in TYPE_ and DECL_LANG_SPECIFIC. */
#define GET_TYPE_LANG_SPECIFIC(NODE) \
diff --git a/gcc/ada/gcc-interface/trans.c b/gcc/ada/gcc-interface/trans.c
index 807b370e077..cfc9fbc3faa 100644
--- a/gcc/ada/gcc-interface/trans.c
+++ b/gcc/ada/gcc-interface/trans.c
@@ -108,8 +108,7 @@ bool type_annotate_only;
/* When not optimizing, we cache the 'First, 'Last and 'Length attributes
of unconstrained array IN parameters to avoid emitting a great deal of
redundant instructions to recompute them each time. */
-struct parm_attr GTY (())
-{
+struct GTY (()) parm_attr {
int id; /* GTY doesn't like Entity_Id. */
int dim;
tree first;
@@ -122,8 +121,7 @@ typedef struct parm_attr *parm_attr;
DEF_VEC_P(parm_attr);
DEF_VEC_ALLOC_P(parm_attr,gc);
-struct language_function GTY(())
-{
+struct GTY(()) language_function {
VEC(parm_attr,gc) *parm_attr_cache;
};
@@ -135,7 +133,7 @@ struct language_function GTY(())
of a IF. In the case where it represents a lexical scope, we may also
have a BLOCK node corresponding to it and/or cleanups. */
-struct stmt_group GTY((chain_next ("%h.previous"))) {
+struct GTY((chain_next ("%h.previous"))) stmt_group {
struct stmt_group *previous; /* Previous code group. */
tree stmt_list; /* List of statements for this code group. */
tree block; /* BLOCK for this code group, if any. */
@@ -152,7 +150,7 @@ static GTY((deletable)) struct stmt_group *stmt_group_free_list;
??? gnat_node should be Node_Id, but gengtype gets confused. */
-struct elab_info GTY((chain_next ("%h.next"))) {
+struct GTY((chain_next ("%h.next"))) elab_info {
struct elab_info *next; /* Pointer to next in chain. */
tree elab_proc; /* Elaboration procedure. */
int gnat_node; /* The N_Compilation_Unit. */
diff --git a/gcc/ada/gcc-interface/utils.c b/gcc/ada/gcc-interface/utils.c
index b2c4399a410..088c83ad23d 100644
--- a/gcc/ada/gcc-interface/utils.c
+++ b/gcc/ada/gcc-interface/utils.c
@@ -160,8 +160,7 @@ static GTY(()) tree float_types[NUM_MACHINE_MODES];
/* For each binding contour we allocate a binding_level structure to indicate
the binding depth. */
-struct gnat_binding_level GTY((chain_next ("%h.chain")))
-{
+struct GTY((chain_next ("%h.chain"))) gnat_binding_level {
/* The binding level containing this one (the enclosing binding level). */
struct gnat_binding_level *chain;
/* The BLOCK node for this level. */
diff --git a/gcc/alias.c b/gcc/alias.c
index 2bc87024f55..85db75569c8 100644
--- a/gcc/alias.c
+++ b/gcc/alias.c
@@ -128,8 +128,7 @@ along with GCC; see the file COPYING3. If not see
However, this is no actual entry for alias set zero. It is an
error to attempt to explicitly construct a subset of zero. */
-struct alias_set_entry GTY(())
-{
+struct GTY(()) alias_set_entry {
/* The alias set number, as stored in MEM_ALIAS_SET. */
alias_set_type alias_set;
diff --git a/gcc/basic-block.h b/gcc/basic-block.h
index 198fbefc0eb..da262ac72b0 100644
--- a/gcc/basic-block.h
+++ b/gcc/basic-block.h
@@ -119,8 +119,7 @@ extern regset regs_invalidated_by_call_regset;
typedef HOST_WIDEST_INT gcov_type;
/* Control flow edge information. */
-struct edge_def GTY(())
-{
+struct GTY(()) edge_def {
/* The two blocks at the ends of the edge. */
struct basic_block_def *src;
struct basic_block_def *dest;
@@ -217,8 +216,7 @@ struct rtl_bb_info;
basic blocks. */
/* Basic block information indexed by block number. */
-struct basic_block_def GTY((chain_next ("%h.next_bb"), chain_prev ("%h.prev_bb")))
-{
+struct GTY((chain_next ("%h.next_bb"), chain_prev ("%h.prev_bb"))) basic_block_def {
/* The edges into and out of the block. */
VEC(edge,gc) *preds;
VEC(edge,gc) *succs;
@@ -257,8 +255,7 @@ struct basic_block_def GTY((chain_next ("%h.next_bb"), chain_prev ("%h.prev_bb")
int flags;
};
-struct rtl_bb_info GTY(())
-{
+struct GTY(()) rtl_bb_info {
/* The first and last insns of the block. */
rtx head_;
rtx end_;
@@ -272,8 +269,7 @@ struct rtl_bb_info GTY(())
int visited;
};
-struct gimple_bb_info GTY(())
-{
+struct GTY(()) gimple_bb_info {
/* Sequence of statements in this block. */
gimple_seq seq;
@@ -369,8 +365,7 @@ enum dom_state
The x_* prefixing is necessary because otherwise references to the
fields of this struct are interpreted as the defines for backward
source compatibility following the definition of this struct. */
-struct control_flow_graph GTY(())
-{
+struct GTY(()) control_flow_graph {
/* Block pointers for the exit and entry of a function.
These are always the head and tail of the basic block list. */
basic_block x_entry_block_ptr;
diff --git a/gcc/bitmap.h b/gcc/bitmap.h
index 99cf752f686..54267c26fdc 100644
--- a/gcc/bitmap.h
+++ b/gcc/bitmap.h
@@ -42,8 +42,7 @@ typedef unsigned long BITMAP_WORD;
#define BITMAP_ELEMENT_ALL_BITS (BITMAP_ELEMENT_WORDS * BITMAP_WORD_BITS)
/* Obstack for allocating bitmaps and elements from. */
-typedef struct bitmap_obstack GTY (())
-{
+typedef struct GTY (()) bitmap_obstack {
struct bitmap_element_def *elements;
struct bitmap_head_def *heads;
struct obstack GTY ((skip)) obstack;
@@ -61,8 +60,7 @@ typedef struct bitmap_obstack GTY (())
bitmap_elt_clear_from to be implemented in unit time rather than
linear in the number of elements to be freed. */
-typedef struct bitmap_element_def GTY(())
-{
+typedef struct GTY(()) bitmap_element_def {
struct bitmap_element_def *next; /* Next element. */
struct bitmap_element_def *prev; /* Previous element. */
unsigned int indx; /* regno/BITMAP_ELEMENT_ALL_BITS. */
@@ -74,7 +72,7 @@ struct bitmap_descriptor;
statistics we need to add a bitmap descriptor pointer. As it is
not collected, we can just GTY((skip)) it. */
-typedef struct bitmap_head_def GTY(()) {
+typedef struct GTY(()) bitmap_head_def {
bitmap_element *first; /* First element in linked list. */
bitmap_element *current; /* Last element looked at. */
unsigned int indx; /* Index of last element looked at. */
diff --git a/gcc/c-common.h b/gcc/c-common.h
index ec47a023bfc..e697488d885 100644
--- a/gcc/c-common.h
+++ b/gcc/c-common.h
@@ -229,8 +229,7 @@ enum c_tree_index
/* Identifier part common to the C front ends. Inherits from
tree_identifier, despite appearances. */
-struct c_common_identifier GTY(())
-{
+struct GTY(()) c_common_identifier {
struct tree_common common;
struct cpp_hashnode node;
};
@@ -334,8 +333,7 @@ extern GTY(()) tree c_global_trees[CTI_MAX];
/* In a RECORD_TYPE, a sorted array of the fields of the type, not a
tree for size reasons. */
-struct sorted_fields_type GTY(())
-{
+struct GTY(()) sorted_fields_type {
int len;
tree GTY((length ("%h.len"))) elts[1];
};
@@ -362,7 +360,7 @@ extern c_language_kind c_language;
/* Information about a statement tree. */
-struct stmt_tree_s GTY(()) {
+struct GTY(()) stmt_tree_s {
/* The current statement list being collected. */
tree x_cur_stmt_list;
@@ -388,7 +386,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 c_language_function GTY(()) {
+struct GTY(()) c_language_function {
/* While we are parsing the function, this contains information
about the statement-tree that we are building. */
struct stmt_tree_s x_stmt_tree;
diff --git a/gcc/c-decl.c b/gcc/c-decl.c
index 7efb82611d0..d2dbfbeea81 100644
--- a/gcc/c-decl.c
+++ b/gcc/c-decl.c
@@ -198,8 +198,7 @@ bool c_override_global_bindings_to_false;
in all such cases, the binding in the outer scope will have its
invisible bit true. */
-struct c_binding GTY((chain_next ("%h.prev")))
-{
+struct GTY((chain_next ("%h.prev"))) c_binding {
tree decl; /* the decl bound */
tree type; /* the type in this scope */
tree id; /* the identifier it's bound to */
@@ -236,8 +235,7 @@ struct c_binding GTY((chain_next ("%h.prev")))
These describe the values of the identifier in the three different
namespaces defined by the language. */
-struct lang_identifier GTY(())
-{
+struct GTY(()) lang_identifier {
struct c_common_identifier common_id;
struct c_binding *symbol_binding; /* vars, funcs, constants, typedefs */
struct c_binding *tag_binding; /* struct/union/enum tags */
@@ -250,10 +248,9 @@ extern char C_SIZEOF_STRUCT_LANG_IDENTIFIER_isnt_accurate
/* 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 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))"))) lang_tree_node
+ {
union tree_node GTY ((tag ("0"),
desc ("tree_node_structure (&%h)")))
generic;
@@ -305,8 +302,7 @@ union lang_tree_node
pop_scope relies on this. */
-struct c_scope GTY((chain_next ("%h.outer")))
-{
+struct GTY((chain_next ("%h.outer"))) c_scope {
/* The scope containing this one. */
struct c_scope *outer;
diff --git a/gcc/c-parser.c b/gcc/c-parser.c
index ed77098b4d3..8e74faf8e01 100644
--- a/gcc/c-parser.c
+++ b/gcc/c-parser.c
@@ -137,8 +137,7 @@ typedef enum c_id_kind {
/* A single C token after string literal concatenation and conversion
of preprocessing tokens to tokens. */
-typedef struct c_token GTY (())
-{
+typedef struct GTY (()) c_token {
/* The kind of token. */
ENUM_BITFIELD (cpp_ttype) type : 8;
/* If this token is a CPP_NAME, this value indicates whether also
@@ -159,8 +158,7 @@ typedef struct c_token GTY (())
/* A parser structure recording information about the state and
context of parsing. Includes lexer information with up to two
tokens of look-ahead; more are not needed for C. */
-typedef struct c_parser GTY(())
-{
+typedef struct GTY(()) c_parser {
/* The look-ahead tokens. */
c_token tokens[2];
/* How many look-ahead tokens are available (0, 1 or 2). */
diff --git a/gcc/c-pragma.c b/gcc/c-pragma.c
index 2f2095ec81a..f33ae50f430 100644
--- a/gcc/c-pragma.c
+++ b/gcc/c-pragma.c
@@ -43,8 +43,7 @@ along with GCC; see the file COPYING3. If not see
#define GCC_BAD2(gmsgid, arg) \
do { warning (OPT_Wpragmas, gmsgid, arg); return; } while (0)
-typedef struct align_stack GTY(())
-{
+typedef struct GTY(()) align_stack {
int alignment;
tree id;
struct align_stack * prev;
@@ -244,14 +243,12 @@ handle_pragma_pack (cpp_reader * ARG_UNUSED (dummy))
}
#endif /* HANDLE_PRAGMA_PACK */
-struct def_pragma_macro_value GTY(())
-{
+struct GTY(()) def_pragma_macro_value {
struct def_pragma_macro_value *prev;
cpp_macro *value;
};
-struct def_pragma_macro GTY(())
-{
+struct GTY(()) def_pragma_macro {
hashval_t hash;
const char *name;
struct def_pragma_macro_value value;
@@ -1009,8 +1006,7 @@ handle_pragma_optimize (cpp_reader *ARG_UNUSED(dummy))
/* Stack of the #pragma GCC options created with #pragma GCC push_option. Save
both the binary representation of the options and the TREE_LIST of
strings that will be added to the function's attribute list. */
-typedef struct opt_stack GTY(())
-{
+typedef struct GTY(()) opt_stack {
struct opt_stack *prev;
tree target_binary;
tree target_strings;
diff --git a/gcc/c-tree.h b/gcc/c-tree.h
index f4a2e71bf0f..64e491e1e33 100644
--- a/gcc/c-tree.h
+++ b/gcc/c-tree.h
@@ -33,8 +33,7 @@ along with GCC; see the file COPYING3. If not see
/* Language-specific declaration information. */
-struct lang_decl GTY(())
-{
+struct GTY(()) lang_decl {
char dummy;
};
@@ -57,8 +56,7 @@ struct lang_decl GTY(())
and C_RID_YYCODE is the token number wanted by Yacc. */
#define C_IS_RESERVED_WORD(ID) TREE_LANG_FLAG_0 (ID)
-struct lang_type GTY(())
-{
+struct GTY(()) lang_type {
/* In a RECORD_TYPE, a sorted array of the fields of the type. */
struct sorted_fields_type * GTY ((reorder ("resort_sorted_fields"))) s;
/* In an ENUMERAL_TYPE, the min and max values. */
@@ -407,8 +405,7 @@ struct c_parm {
that keep track of the progress of compilation of the current function.
Used for nested functions. */
-struct language_function GTY(())
-{
+struct GTY(()) language_function {
struct c_language_function base;
tree x_break_label;
tree x_cont_label;
diff --git a/gcc/cfgloop.h b/gcc/cfgloop.h
index 0af5be02d76..d95e50d585e 100644
--- a/gcc/cfgloop.h
+++ b/gcc/cfgloop.h
@@ -38,16 +38,14 @@ enum lpt_dec
LPT_UNROLL_STUPID
};
-struct lpt_decision GTY (())
-{
+struct GTY (()) lpt_decision {
enum lpt_dec decision;
unsigned times;
};
/* The structure describing a bound on number of iterations of a loop. */
-struct nb_iter_bound GTY ((chain_next ("%h.next")))
-{
+struct GTY ((chain_next ("%h.next"))) nb_iter_bound {
/* The statement STMT is executed at most ... */
gimple stmt;
@@ -71,8 +69,7 @@ struct nb_iter_bound GTY ((chain_next ("%h.next")))
/* Description of the loop exit. */
-struct loop_exit GTY (())
-{
+struct GTY (()) loop_exit {
/* The exit edge. */
struct edge_def *e;
@@ -100,8 +97,7 @@ enum loop_estimation
};
/* Structure to hold information for each natural loop. */
-struct loop GTY ((chain_next ("%h.next")))
-{
+struct GTY ((chain_next ("%h.next"))) loop {
/* Index into loops array. */
int num;
@@ -181,8 +177,7 @@ enum
#define AVOID_CFG_MODIFICATIONS (LOOPS_MAY_HAVE_MULTIPLE_LATCHES)
/* Structure to hold CFG information about natural loops within a function. */
-struct loops GTY (())
-{
+struct GTY (()) loops {
/* State of loops. */
int state;
diff --git a/gcc/cgraph.h b/gcc/cgraph.h
index 984d727728b..b100fa6ddc4 100644
--- a/gcc/cgraph.h
+++ b/gcc/cgraph.h
@@ -51,8 +51,7 @@ extern const char * const cgraph_availability_names[];
/* Information about the function collected locally.
Available after function is analyzed. */
-struct cgraph_local_info GTY(())
-{
+struct GTY(()) cgraph_local_info {
struct inline_summary {
/* Estimated stack frame consumption by the function. */
HOST_WIDE_INT estimated_self_stack_size;
@@ -93,8 +92,7 @@ struct cgraph_local_info GTY(())
/* Information about the function that needs to be computed globally
once compilation is finished. Available only with -funit-at-a-time. */
-struct cgraph_global_info GTY(())
-{
+struct GTY(()) cgraph_global_info {
/* Estimated stack frame consumption by the function. */
HOST_WIDE_INT estimated_stack_size;
/* Expected offset of the stack frame of inlined function. */
@@ -117,16 +115,14 @@ struct cgraph_global_info GTY(())
/* Information about the function that is propagated by the RTL backend.
Available only for functions that has been already assembled. */
-struct cgraph_rtl_info GTY(())
-{
+struct GTY(()) cgraph_rtl_info {
unsigned int preferred_incoming_stack_boundary;
};
/* The cgraph data structure.
Each function decl has assigned cgraph_node listing callees and callers. */
-struct cgraph_node GTY((chain_next ("%h.next"), chain_prev ("%h.previous")))
-{
+struct GTY((chain_next ("%h.next"), chain_prev ("%h.previous"))) cgraph_node {
tree decl;
struct cgraph_edge *callees;
struct cgraph_edge *callers;
@@ -197,7 +193,7 @@ DEF_VEC_ALLOC_P(cgraph_node_ptr,gc);
/* A cgraph node set is a collection of cgraph nodes. A cgraph node
can appear in multiple sets. */
-struct cgraph_node_set_def GTY(())
+struct GTY(()) cgraph_node_set_def
{
htab_t GTY((param_is (struct cgraph_node_set_element_def))) hashtab;
VEC(cgraph_node_ptr, gc) *nodes;
@@ -212,7 +208,7 @@ DEF_VEC_ALLOC_P(cgraph_node_set,heap);
/* A cgraph node set element contains an index in the vector of nodes in
the set. */
-struct cgraph_node_set_element_def GTY(())
+struct GTY(()) cgraph_node_set_element_def
{
struct cgraph_node *node;
HOST_WIDE_INT index;
@@ -235,8 +231,7 @@ typedef enum {
CIF_N_REASONS
} cgraph_inline_failed_t;
-struct cgraph_edge GTY((chain_next ("%h.next_caller"), chain_prev ("%h.prev_caller")))
-{
+struct GTY((chain_next ("%h.next_caller"), chain_prev ("%h.prev_caller"))) cgraph_edge {
struct cgraph_node *caller;
struct cgraph_node *callee;
struct cgraph_edge *prev_caller;
@@ -275,8 +270,7 @@ DEF_VEC_ALLOC_P(cgraph_edge_p,heap);
/* The varpool data structure.
Each static variable decl has assigned varpool_node. */
-struct varpool_node GTY((chain_next ("%h.next")))
-{
+struct GTY((chain_next ("%h.next"))) varpool_node {
tree decl;
/* Pointer to the next function in varpool_nodes. */
struct varpool_node *next;
@@ -306,8 +300,7 @@ struct varpool_node GTY((chain_next ("%h.next")))
/* Every top level asm statement is put into a cgraph_asm_node. */
-struct cgraph_asm_node GTY(())
-{
+struct GTY(()) cgraph_asm_node {
/* Next asm node. */
struct cgraph_asm_node *next;
/* String for this asm node. */
diff --git a/gcc/config/alpha/alpha.c b/gcc/config/alpha/alpha.c
index da4dc08a13a..9df8c117dbc 100644
--- a/gcc/config/alpha/alpha.c
+++ b/gcc/config/alpha/alpha.c
@@ -2852,7 +2852,7 @@ alpha_split_conditional_move (enum rtx_code code, rtx dest, rtx cond,
/* Look up the function X_floating library function name for the
given operation. */
-struct xfloating_op GTY(())
+struct GTY(()) xfloating_op
{
const enum rtx_code code;
const char *const GTY((skip)) osf_func;
@@ -4746,7 +4746,7 @@ alpha_multipass_dfa_lookahead (void)
/* Machine-specific function data. */
-struct machine_function GTY(())
+struct GTY(()) machine_function
{
/* For unicosmk. */
/* List of call information words for calls from this function. */
@@ -9487,7 +9487,7 @@ alpha_elf_section_type_flags (tree decl, const char *name, int reloc)
enum links_kind {KIND_UNUSED, KIND_LOCAL, KIND_EXTERN};
enum reloc_kind {KIND_LINKAGE, KIND_CODEADDR};
-struct alpha_links GTY(())
+struct GTY(()) alpha_links
{
int num;
rtx linkage;
@@ -9495,7 +9495,7 @@ struct alpha_links GTY(())
enum reloc_kind rkind;
};
-struct alpha_funcs GTY(())
+struct GTY(()) alpha_funcs
{
int num;
splay_tree GTY ((param1_is (char *), param2_is (struct alpha_links *)))
diff --git a/gcc/config/arm/arm.h b/gcc/config/arm/arm.h
index 59ab1660478..15913d2ca44 100644
--- a/gcc/config/arm/arm.h
+++ b/gcc/config/arm/arm.h
@@ -1571,7 +1571,7 @@ do { \
in the direction of stack growth.
Only soft_frame is used in thumb mode. */
-typedef struct arm_stack_offsets GTY(())
+typedef struct GTY(()) arm_stack_offsets
{
int saved_args; /* ARG_POINTER_REGNUM. */
int frame; /* ARM_HARD_FRAME_POINTER_REGNUM. */
@@ -1585,7 +1585,7 @@ arm_stack_offsets;
/* A C structure for machine-specific, per-function data.
This is added to the cfun structure. */
-typedef struct machine_function GTY(())
+typedef struct GTY(()) machine_function
{
/* Additional stack adjustment in __builtin_eh_throw. */
rtx eh_epilogue_sp_ofs;
diff --git a/gcc/config/avr/avr.h b/gcc/config/avr/avr.h
index cfcb5818fdc..32508dfe2eb 100644
--- a/gcc/config/avr/avr.h
+++ b/gcc/config/avr/avr.h
@@ -1090,7 +1090,7 @@ mmcu=*:-mmcu=%*}"
/* A C structure for machine-specific, per-function data.
This is added to the cfun structure. */
-struct machine_function GTY(())
+struct GTY(()) machine_function
{
/* 'true' - if the current function is a leaf function. */
int is_leaf;
diff --git a/gcc/config/bfin/bfin.c b/gcc/config/bfin/bfin.c
index d1c964d02ea..adb72b077a8 100644
--- a/gcc/config/bfin/bfin.c
+++ b/gcc/config/bfin/bfin.c
@@ -58,7 +58,7 @@
/* A C structure for machine-specific, per-function data.
This is added to the cfun structure. */
-struct machine_function GTY(())
+struct GTY(()) machine_function
{
/* Set if we are notified by the doloop pass that a hardware loop
was created. */
@@ -3610,7 +3610,7 @@ DEF_VEC_ALLOC_P (loop_info,heap);
/* Information about a loop we have found (or are in the process of
finding). */
-struct loop_info GTY (())
+struct GTY (()) loop_info
{
/* loop number, for dumps */
int loop_no;
diff --git a/gcc/config/cris/cris.c b/gcc/config/cris/cris.c
index 9bae9cdb44e..2112670de6c 100644
--- a/gcc/config/cris/cris.c
+++ b/gcc/config/cris/cris.c
@@ -63,7 +63,7 @@ enum cris_retinsn_type
{ CRIS_RETINSN_UNKNOWN = 0, CRIS_RETINSN_RET, CRIS_RETINSN_JUMP };
/* Per-function machine data. */
-struct machine_function GTY(())
+struct GTY(()) machine_function
{
int needs_return_address_on_stack;
diff --git a/gcc/config/darwin.c b/gcc/config/darwin.c
index 3a4fc99c5b3..f8c982e3842 100644
--- a/gcc/config/darwin.c
+++ b/gcc/config/darwin.c
@@ -314,7 +314,7 @@ machopic_output_function_base_name (FILE *file)
/* The suffix attached to stub symbols. */
#define STUB_SUFFIX "$stub"
-typedef struct machopic_indirection GTY (())
+typedef struct GTY (()) machopic_indirection
{
/* The SYMBOL_REF for the entity referenced. */
rtx symbol;
diff --git a/gcc/config/frv/frv.c b/gcc/config/frv/frv.c
index 7dde7e4464b..ecaf6d7d6b2 100644
--- a/gcc/config/frv/frv.c
+++ b/gcc/config/frv/frv.c
@@ -139,7 +139,7 @@ struct frv_io {
REG++)
/* This structure contains machine specific function data. */
-struct machine_function GTY(())
+struct GTY(()) machine_function
{
/* True if we have created an rtx that relies on the stack frame. */
int frame_needed;
diff --git a/gcc/config/i386/i386.c b/gcc/config/i386/i386.c
index 6e60fb7e70b..51a2f71a847 100644
--- a/gcc/config/i386/i386.c
+++ b/gcc/config/i386/i386.c
@@ -1722,8 +1722,7 @@ static int const x86_64_int_return_registers[4] =
/* Define the structure for the machine field in struct function. */
-struct stack_local_entry GTY(())
-{
+struct GTY(()) stack_local_entry {
unsigned short mode;
unsigned short n;
rtx rtl;
@@ -20864,8 +20863,7 @@ static GTY(()) tree ix86_builtins[(int) IX86_BUILTIN_MAX];
/* Table of all of the builtin functions that are possible with different ISA's
but are waiting to be built until a function is declared to use that
ISA. */
-struct builtin_isa GTY(())
-{
+struct GTY(()) builtin_isa {
tree type; /* builtin type to use in the declaration */
const char *name; /* function name */
int isa; /* isa_flags this builtin is defined for */
diff --git a/gcc/config/i386/i386.h b/gcc/config/i386/i386.h
index 8979d5b8143..b3972a3f7c2 100644
--- a/gcc/config/i386/i386.h
+++ b/gcc/config/i386/i386.h
@@ -2420,8 +2420,7 @@ enum ix86_stack_slot
#define FASTCALL_PREFIX '@'
-struct machine_function GTY(())
-{
+struct GTY(()) machine_function {
struct stack_local_entry *stack_locals;
const char *some_ld_name;
int varargs_gpr_size;
diff --git a/gcc/config/i386/winnt.c b/gcc/config/i386/winnt.c
index ae9196c596f..62ac279ccd4 100644
--- a/gcc/config/i386/winnt.c
+++ b/gcc/config/i386/winnt.c
@@ -539,7 +539,7 @@ i386_pe_declare_function_type (FILE *file, const char *name, int pub)
/* Keep a list of external functions. */
-struct extern_list GTY(())
+struct GTY(()) extern_list
{
struct extern_list *next;
tree decl;
@@ -568,7 +568,7 @@ i386_pe_record_external_function (tree decl, const char *name)
/* Keep a list of exported symbols. */
-struct export_list GTY(())
+struct GTY(()) export_list
{
struct export_list *next;
const char *name;
diff --git a/gcc/config/ia64/ia64.h b/gcc/config/ia64/ia64.h
index 217aaa58053..74e50788326 100644
--- a/gcc/config/ia64/ia64.h
+++ b/gcc/config/ia64/ia64.h
@@ -1931,7 +1931,7 @@ extern int ia64_final_schedule;
#define EH_RETURN_DATA_REGNO(N) ((N) < 4 ? (N) + 15 : INVALID_REGNUM)
/* This function contains machine specific function data. */
-struct machine_function GTY(())
+struct GTY(()) machine_function
{
/* The new stack pointer when unwinding from EH. */
rtx ia64_eh_epilogue_sp;
diff --git a/gcc/config/iq2000/iq2000.c b/gcc/config/iq2000/iq2000.c
index 71533894551..1a99eeabb14 100644
--- a/gcc/config/iq2000/iq2000.c
+++ b/gcc/config/iq2000/iq2000.c
@@ -89,7 +89,7 @@ struct iq2000_frame_info
int num_gp; /* Number of gp registers saved. */
} iq2000_frame_info;
-struct machine_function GTY(())
+struct GTY(()) machine_function
{
/* Current frame information, calculated by compute_frame_size. */
long total_size; /* # bytes that the entire frame takes up. */
diff --git a/gcc/config/mips/mips.c b/gcc/config/mips/mips.c
index 8e3cdcfa6d8..a677f9392b4 100644
--- a/gcc/config/mips/mips.c
+++ b/gcc/config/mips/mips.c
@@ -241,7 +241,7 @@ static const char *const mips_fp_conditions[] = {
};
/* Information about a function's frame layout. */
-struct mips_frame_info GTY(()) {
+struct GTY(()) mips_frame_info {
/* The size of the frame in bytes. */
HOST_WIDE_INT total_size;
@@ -292,7 +292,7 @@ struct mips_frame_info GTY(()) {
HOST_WIDE_INT hard_frame_pointer_offset;
};
-struct machine_function GTY(()) {
+struct GTY(()) machine_function {
/* The register returned by mips16_gp_pseudo_reg; see there for details. */
rtx mips16_gp_pseudo_rtx;
@@ -1106,7 +1106,7 @@ static const struct mips_rtx_cost_data mips_rtx_cost_data[PROCESSOR_MAX] = {
/* This hash table keeps track of implicit "mips16" and "nomips16" attributes
for -mflip_mips16. It maps decl names onto a boolean mode setting. */
-struct mflip_mips16_entry GTY (()) {
+struct GTY (()) mflip_mips16_entry {
const char *name;
bool mips16_p;
};
@@ -5540,7 +5540,7 @@ mips_load_call_address (enum mips_call_type type, rtx dest, rtx addr)
/* Each locally-defined hard-float MIPS16 function has a local symbol
associated with it. This hash table maps the function symbol (FUNC)
to the local symbol (LOCAL). */
-struct mips16_local_alias GTY(()) {
+struct GTY(()) mips16_local_alias {
rtx func;
rtx local;
};
diff --git a/gcc/config/mmix/mmix.h b/gcc/config/mmix/mmix.h
index c479c465014..a7fb6e5884e 100644
--- a/gcc/config/mmix/mmix.h
+++ b/gcc/config/mmix/mmix.h
@@ -89,7 +89,7 @@ extern GTY(()) rtx mmix_compare_op1;
/* Per-function machine data. This is normally an opaque type just
defined and used in the tm.c file, but we need to see the definition in
mmix.md too. */
-struct machine_function GTY(())
+struct GTY(()) machine_function
{
int has_landing_pad;
int highest_saved_stack_register;
diff --git a/gcc/config/pa/pa.c b/gcc/config/pa/pa.c
index 0f42d6bd98c..08c987fbedf 100644
--- a/gcc/config/pa/pa.c
+++ b/gcc/config/pa/pa.c
@@ -196,7 +196,7 @@ static unsigned int last_address;
/* Variables to handle plabels that we discover are necessary at assembly
output time. They are output after the current function. */
-struct deferred_plabel GTY(())
+struct GTY(()) deferred_plabel
{
rtx internal_label;
rtx symbol;
@@ -9602,7 +9602,7 @@ pa_return_in_memory (const_tree type, const_tree fntype ATTRIBUTE_UNUSED)
at the end of the file if and only if SYMBOL_REF_REFERENCED_P is true.
This avoids putting out names that are never really used. */
-typedef struct extern_symbol GTY(())
+typedef struct GTY(()) extern_symbol
{
tree decl;
const char *name;
diff --git a/gcc/config/pa/pa.h b/gcc/config/pa/pa.h
index c1d589dc36b..ee890935b30 100644
--- a/gcc/config/pa/pa.h
+++ b/gcc/config/pa/pa.h
@@ -249,7 +249,7 @@ do { \
#define CAN_DEBUG_WITHOUT_FP
/* target machine storage layout */
-typedef struct machine_function GTY(())
+typedef struct GTY(()) machine_function
{
/* Flag indicating that a .NSUBSPA directive has been output for
this function. */
diff --git a/gcc/config/rs6000/rs6000.c b/gcc/config/rs6000/rs6000.c
index 69ef4d209cf..c785bf83863 100644
--- a/gcc/config/rs6000/rs6000.c
+++ b/gcc/config/rs6000/rs6000.c
@@ -113,7 +113,7 @@ typedef struct rs6000_stack {
/* A C structure for machine-specific, per-function data.
This is added to the cfun structure. */
-typedef struct machine_function GTY(())
+typedef struct GTY(()) machine_function
{
/* Flags if __builtin_return_address (n) with n >= 1 was used. */
int ra_needs_full_frame;
@@ -974,7 +974,7 @@ static enum machine_mode rs6000_eh_return_filter_mode (void);
/* Hash table stuff for keeping track of TOC entries. */
-struct toc_hash_struct GTY(())
+struct GTY(()) toc_hash_struct
{
/* `key' will satisfy CONSTANT_P; in fact, it will satisfy
ASM_OUTPUT_SPECIAL_POOL_ENTRY_P. */
diff --git a/gcc/config/s390/s390.c b/gcc/config/s390/s390.c
index 5c1f1b17f2b..7c485fd527c 100644
--- a/gcc/config/s390/s390.c
+++ b/gcc/config/s390/s390.c
@@ -260,7 +260,7 @@ HOST_WIDE_INT s390_stack_guard = 0;
/* The following structure is embedded in the machine
specific part of struct function. */
-struct s390_frame_layout GTY (())
+struct GTY (()) s390_frame_layout
{
/* Offset within stack frame. */
HOST_WIDE_INT gprs_offset;
@@ -303,7 +303,7 @@ struct s390_frame_layout GTY (())
/* Define the structure for the machine field in struct function. */
-struct machine_function GTY(())
+struct GTY(()) machine_function
{
struct s390_frame_layout frame_layout;
diff --git a/gcc/config/sparc/sparc.c b/gcc/config/sparc/sparc.c
index 62d025f4ceb..88d786b9f23 100644
--- a/gcc/config/sparc/sparc.c
+++ b/gcc/config/sparc/sparc.c
@@ -321,7 +321,7 @@ char sparc_leaf_regs[] =
1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1};
-struct machine_function GTY(())
+struct GTY(()) machine_function
{
/* Some local-dynamic TLS symbol name. */
const char *some_ld_name;
diff --git a/gcc/config/xtensa/xtensa.c b/gcc/config/xtensa/xtensa.c
index 4e7edef75a2..14825c31de3 100644
--- a/gcc/config/xtensa/xtensa.c
+++ b/gcc/config/xtensa/xtensa.c
@@ -89,7 +89,7 @@ unsigned xtensa_current_frame_size;
#define LARGEST_MOVE_RATIO 15
/* Define the structure for the machine field in struct function. */
-struct machine_function GTY(())
+struct GTY(()) machine_function
{
int accesses_prev_frame;
bool need_a7_copy;
diff --git a/gcc/coretypes.h b/gcc/coretypes.h
index ab870951530..a04953e40bf 100644
--- a/gcc/coretypes.h
+++ b/gcc/coretypes.h
@@ -37,7 +37,9 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
#ifndef GCC_CORETYPES_H
#define GCC_CORETYPES_H
+#ifndef GTY
#define GTY(x) /* nothing - marker for gengtype */
+#endif
#ifndef USED_FOR_TARGET
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog
index 1b67ad87944..b560aa871f0 100644
--- a/gcc/cp/ChangeLog
+++ b/gcc/cp/ChangeLog
@@ -1,3 +1,16 @@
+2009-04-21 Taras Glek <tglek@mozilla.com>
+
+ * cp-tree.h: Update GTY annotations to new syntax.
+ * decl.c: Likewise.
+ * mangle.c: Likewise.
+ * name-lookup.c: Likewise.
+ * name-lookup.h: Likewise.
+ * parser.c: Likewise.
+ * pt.c: Likewise.
+ * rtti.c: Likewise.
+ * semantics.c: Likewise.
+ * typeck2.c: Likewise.
+
2009-04-22 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
PR c++/14875
diff --git a/gcc/cp/cp-tree.h b/gcc/cp/cp-tree.h
index d66e0de4775..a4fc7c00a97 100644
--- a/gcc/cp/cp-tree.h
+++ b/gcc/cp/cp-tree.h
@@ -219,8 +219,7 @@ framework extensions, you must include this file before toplev.h, not after.
/* Language-dependent contents of an identifier. */
-struct lang_identifier GTY(())
-{
+struct GTY(()) lang_identifier {
struct c_common_identifier c_common;
cxx_binding *namespace_bindings;
cxx_binding *bindings;
@@ -237,8 +236,7 @@ struct lang_identifier GTY(())
#define LANG_IDENTIFIER_CAST(NODE) \
((struct lang_identifier*)IDENTIFIER_NODE_CHECK (NODE))
-struct template_parm_index_s GTY(())
-{
+struct GTY(()) template_parm_index_s {
struct tree_common common;
int index;
int level;
@@ -247,8 +245,7 @@ struct template_parm_index_s GTY(())
};
typedef struct template_parm_index_s template_parm_index;
-struct ptrmem_cst GTY(())
-{
+struct GTY(()) ptrmem_cst {
struct tree_common common;
/* This isn't used, but the middle-end expects all constants to have
this field. */
@@ -331,8 +328,7 @@ typedef struct ptrmem_cst * ptrmem_cst_t;
is not important for this node. */
#define OVL_USED(NODE) TREE_USED (NODE)
-struct tree_overload GTY(())
-{
+struct GTY(()) tree_overload {
struct tree_common common;
tree function;
};
@@ -363,8 +359,7 @@ struct tree_overload GTY(())
#define BASELINK_QUALIFIED_P(NODE) \
TREE_LANG_FLAG_0 (BASELINK_CHECK (NODE))
-struct tree_baselink GTY(())
-{
+struct GTY(()) tree_baselink {
struct tree_common common;
tree binfo;
tree functions;
@@ -453,8 +448,7 @@ typedef enum cp_id_kind
#define DEFARG_INSTANTIATIONS(NODE) \
(((struct tree_default_arg *)DEFAULT_ARG_CHECK (NODE))->instantiations)
-struct tree_default_arg GTY (())
-{
+struct GTY (()) tree_default_arg {
struct tree_common common;
struct cp_token_cache *tokens;
VEC(tree,gc) *instantiations;
@@ -475,16 +469,14 @@ struct tree_default_arg GTY (())
#define STATIC_ASSERT_SOURCE_LOCATION(NODE) \
(((struct tree_static_assert *)STATIC_ASSERT_CHECK (NODE))->location)
-struct tree_static_assert GTY (())
-{
+struct GTY (()) tree_static_assert {
struct tree_common common;
tree condition;
tree message;
location_t location;
};
-struct tree_argument_pack_select GTY (())
-{
+struct GTY (()) tree_argument_pack_select {
struct tree_common common;
tree argument_pack;
int index;
@@ -524,8 +516,7 @@ typedef enum cp_trait_kind
#define TRAIT_EXPR_KIND(NODE) \
(((struct tree_trait_expr *)TRAIT_EXPR_CHECK (NODE))->kind)
-struct tree_trait_expr GTY (())
-{
+struct GTY (()) tree_trait_expr {
struct tree_common common;
tree type1;
tree type2;
@@ -549,9 +540,8 @@ enum cp_tree_node_structure_enum {
};
/* The resulting tree type. */
-union lang_tree_node GTY((desc ("cp_tree_node_structure (&%h)"),
- chain_next ("(union lang_tree_node *)TREE_CHAIN (&%h.generic)")))
-{
+union GTY((desc ("cp_tree_node_structure (&%h)"),
+ chain_next ("(union lang_tree_node *)TREE_CHAIN (&%h.generic)"))) lang_tree_node {
union tree_node GTY ((tag ("TS_CP_GENERIC"),
desc ("tree_node_structure (&%h)"))) generic;
struct template_parm_index_s GTY ((tag ("TS_CP_TPI"))) tpi;
@@ -747,8 +737,7 @@ extern GTY(()) tree cp_global_trees[CPTI_MAX];
/* Global state. */
-struct saved_scope GTY(())
-{
+struct GTY(()) saved_scope {
VEC(cxx_saved_binding,gc) *old_bindings;
tree old_namespace;
tree decl_ns_list;
@@ -826,8 +815,7 @@ struct saved_scope GTY(())
extern GTY(()) struct saved_scope *scope_chain;
-struct cxx_int_tree_map GTY(())
-{
+struct GTY(()) cxx_int_tree_map {
unsigned int uid;
tree to;
};
@@ -837,8 +825,7 @@ extern int cxx_int_tree_map_eq (const void *, const void *);
/* Global state pertinent to the current function. */
-struct language_function GTY(())
-{
+struct GTY(()) language_function {
struct c_language_function base;
tree x_cdtor_label;
@@ -1061,8 +1048,7 @@ enum languages { lang_c, lang_cplusplus, lang_java };
#define CLASSTYPE_VISIBILITY_SPECIFIED(TYPE) \
DECL_VISIBILITY_SPECIFIED (TYPE_NAME (TYPE))
-typedef struct tree_pair_s GTY (())
-{
+typedef struct GTY (()) tree_pair_s {
tree purpose;
tree value;
} tree_pair_s;
@@ -1073,8 +1059,7 @@ DEF_VEC_ALLOC_O (tree_pair_s,gc);
/* This is a few header flags for 'struct lang_type'. Actually,
all but the first are used only for lang_type_class; they
are put in this structure to save space. */
-struct lang_type_header GTY(())
-{
+struct GTY(()) lang_type_header {
BOOL_BITFIELD is_lang_type_class : 1;
BOOL_BITFIELD has_type_conversion : 1;
@@ -1100,8 +1085,7 @@ struct lang_type_header GTY(())
many (i.e., thousands) of classes can easily be generated.
Therefore, we should endeavor to keep the size of this structure to
a minimum. */
-struct lang_type_class GTY(())
-{
+struct GTY(()) lang_type_class {
struct lang_type_header h;
unsigned char align;
@@ -1176,14 +1160,12 @@ struct lang_type_class GTY(())
tree objc_info;
};
-struct lang_type_ptrmem GTY(())
-{
+struct GTY(()) lang_type_ptrmem {
struct lang_type_header h;
tree record;
};
-struct lang_type GTY(())
-{
+struct GTY(()) lang_type {
union lang_type_u
{
struct lang_type_header GTY((skip (""))) h;
@@ -1593,8 +1575,7 @@ struct lang_type GTY(())
|| TREE_CODE (NODE) == CONST_DECL \
|| TREE_CODE (NODE) == USING_DECL))
-struct lang_decl_flags GTY(())
-{
+struct GTY(()) lang_decl_flags {
ENUM_BITFIELD(languages) language : 4;
unsigned global_ctor_p : 1;
unsigned global_dtor_p : 1;
@@ -1653,8 +1634,7 @@ struct lang_decl_flags GTY(())
/* sorted_fields is sorted based on a pointer, so we need to be able
to resort it if pointers get rearranged. */
-struct lang_decl GTY(())
-{
+struct GTY(()) lang_decl {
struct lang_decl_flags decl_flags;
union lang_decl_u4
@@ -2517,8 +2497,7 @@ extern void decl_shadowed_for_var_insert (tree, tree);
/* Abstract iterators for AGGR_INIT_EXPRs. */
/* Structure containing iterator state. */
-typedef struct aggr_init_expr_arg_iterator_d GTY (())
-{
+typedef struct GTY (()) aggr_init_expr_arg_iterator_d {
tree t; /* the aggr_init_expr */
int n; /* argument count */
int i; /* next argument index */
@@ -3970,8 +3949,7 @@ extern void init_reswords (void);
opname_tab[(int) MINUS_EXPR] == "-". */
extern const char **opname_tab, **assignop_tab;
-typedef struct operator_name_info_t GTY(())
-{
+typedef struct GTY(()) operator_name_info_t {
/* The IDENTIFIER_NODE for the operator. */
tree identifier;
/* The name of the operator. */
@@ -4160,8 +4138,7 @@ struct cp_declarator {
};
/* A level of template instantiation. */
-struct tinst_level GTY(())
-{
+struct GTY(()) tinst_level {
/* The immediately deeper level in the chain. */
struct tinst_level *next;
@@ -4694,8 +4671,7 @@ extern int shared_member_p (tree);
/* The representation of a deferred access check. */
-typedef struct deferred_access_check GTY(())
-{
+typedef struct GTY(()) deferred_access_check {
/* The base class in which the declaration is referenced. */
tree binfo;
/* The declaration whose access must be checked. */
diff --git a/gcc/cp/decl.c b/gcc/cp/decl.c
index 9aebe2af9c1..e06dce2719a 100644
--- a/gcc/cp/decl.c
+++ b/gcc/cp/decl.c
@@ -169,8 +169,7 @@ tree integer_two_node, integer_three_node;
/* Used only for jumps to as-yet undefined labels, since jumps to
defined labels can have their validity checked immediately. */
-struct named_label_use_entry GTY(())
-{
+struct GTY(()) named_label_use_entry {
struct named_label_use_entry *next;
/* The binding level to which this entry is *currently* attached.
This is initially the binding level in which the goto appeared,
@@ -192,8 +191,7 @@ struct named_label_use_entry GTY(())
we can clear out their names' definitions at the end of the
function, and so we can check the validity of jumps to these labels. */
-struct named_label_entry GTY(())
-{
+struct GTY(()) named_label_entry {
/* The decl itself. */
tree label_decl;
diff --git a/gcc/cp/mangle.c b/gcc/cp/mangle.c
index 5f2ace0cbb1..ff77981c264 100644
--- a/gcc/cp/mangle.c
+++ b/gcc/cp/mangle.c
@@ -90,8 +90,7 @@ along with GCC; see the file COPYING3. If not see
&& (PRIMARY_TEMPLATE_P (CLASSTYPE_TI_TEMPLATE (NODE))))))
/* Things we only need one of. This module is not reentrant. */
-typedef struct globals GTY(())
-{
+typedef struct GTY(()) globals {
/* An array of the current substitution candidates, in the order
we've seen them. */
VEC(tree,gc) *substitutions;
diff --git a/gcc/cp/name-lookup.c b/gcc/cp/name-lookup.c
index d8b2e7c5e92..e499edeabba 100644
--- a/gcc/cp/name-lookup.c
+++ b/gcc/cp/name-lookup.c
@@ -125,8 +125,7 @@ binding_entry_free (binding_entry entry)
/* The datatype used to implement the mapping from names to types at
a given scope. */
-struct binding_table_s GTY(())
-{
+struct GTY(()) binding_table_s {
/* Array of chains of "binding_entry"s */
binding_entry * GTY((length ("%h.chain_count"))) chain;
diff --git a/gcc/cp/name-lookup.h b/gcc/cp/name-lookup.h
index eab27eeb982..6de4cfa7d43 100644
--- a/gcc/cp/name-lookup.h
+++ b/gcc/cp/name-lookup.h
@@ -31,8 +31,7 @@ typedef struct binding_entry_s *binding_entry;
/* The type of a routine repeatedly called by binding_table_foreach. */
typedef void (*bt_foreach_proc) (binding_entry, void *);
-struct binding_entry_s GTY(())
-{
+struct GTY(()) binding_entry_s {
binding_entry chain;
tree name;
tree type;
@@ -63,8 +62,7 @@ typedef struct cp_binding_level cxx_scope;
currently being defined. */
#define INHERITED_VALUE_BINDING_P(NODE) ((NODE)->value_is_inherited)
-struct cxx_binding GTY(())
-{
+struct GTY(()) cxx_binding {
/* Link to chain together various bindings for this name. */
cxx_binding *previous;
/* The non-type entity this name is bound to. */
@@ -79,8 +77,7 @@ struct cxx_binding GTY(())
/* Datatype used to temporarily save C++ bindings (for implicit
instantiations purposes and like). Implemented in decl.c. */
-typedef struct cxx_saved_binding GTY(())
-{
+typedef struct GTY(()) cxx_saved_binding {
/* The name of the current binding. */
tree identifier;
/* The binding we're saving. */
@@ -141,8 +138,7 @@ typedef enum tag_scope {
and [class.friend]/9. */
} tag_scope;
-typedef struct cp_class_binding GTY(())
-{
+typedef struct GTY(()) cp_class_binding {
cxx_binding base;
/* The bound name. */
tree identifier;
@@ -175,8 +171,7 @@ DEF_VEC_ALLOC_O(cp_class_binding,gc);
/* Note that the information in the `names' component of the global contour
is duplicated in the IDENTIFIER_GLOBAL_VALUEs of all identifiers. */
-struct cp_binding_level GTY(())
- {
+struct GTY(()) cp_binding_level {
/* A chain of _DECL nodes for all variables, constants, functions,
and typedef types. These are in the reverse of the order
supplied. There may be OVERLOADs on this list, too, but they
diff --git a/gcc/cp/parser.c b/gcc/cp/parser.c
index fbf211bfb9f..806d6f9645a 100644
--- a/gcc/cp/parser.c
+++ b/gcc/cp/parser.c
@@ -48,8 +48,7 @@ along with GCC; see the file COPYING3. If not see
/* A token's value and its associated deferred access checks and
qualifying scope. */
-struct tree_check GTY(())
-{
+struct GTY(()) tree_check {
/* The value associated with the token. */
tree value;
/* The checks that have been associated with value. */
@@ -61,8 +60,7 @@ struct tree_check GTY(())
/* A C++ token. */
-typedef struct cp_token GTY (())
-{
+typedef struct GTY (()) cp_token {
/* The kind of token. */
ENUM_BITFIELD (cpp_ttype) type : 8;
/* If this token is a keyword, this value indicates which keyword.
@@ -104,8 +102,7 @@ static cp_token eof_token =
it to the parser. Tokens are never added to the cp_lexer after
it is created. */
-typedef struct cp_lexer GTY (())
-{
+typedef struct GTY (()) cp_lexer {
/* The memory allocated for the buffer. NULL if this lexer does not
own the token buffer. */
cp_token * GTY ((length ("%h.buffer_length"))) buffer;
@@ -144,8 +141,7 @@ typedef struct cp_lexer GTY (())
a cp_token_cache, since everything in here is referenced through
a lexer. */
-typedef struct cp_token_cache GTY(())
-{
+typedef struct GTY(()) cp_token_cache {
/* The beginning of the token range. */
cp_token * GTY((skip)) first;
@@ -1282,8 +1278,7 @@ typedef struct cp_parser_expression_stack_entry
cp_parser_expression_stack[NUM_PREC_VALUES];
/* Context that is saved and restored when parsing tentatively. */
-typedef struct cp_parser_context GTY (())
-{
+typedef struct GTY (()) cp_parser_context {
/* If this is a tentative parsing context, the status of the
tentative parse. */
enum cp_parser_status_kind status;
@@ -1389,8 +1384,7 @@ cp_parser_context_new (cp_parser_context* next)
/* The cp_parser structure represents the C++ parser. */
-typedef struct cp_parser GTY(())
-{
+typedef struct GTY(()) cp_parser {
/* The lexer from which we are obtaining tokens. */
cp_lexer *lexer;
diff --git a/gcc/cp/pt.c b/gcc/cp/pt.c
index b58b9f1f8ef..a4a5c10af7d 100644
--- a/gcc/cp/pt.c
+++ b/gcc/cp/pt.c
@@ -54,7 +54,7 @@ typedef int (*tree_fn_t) (tree, void*);
/* The PENDING_TEMPLATES is a TREE_LIST of templates whose
instantiations have been deferred, either because their definitions
were not yet available, or because we were putting off doing the work. */
-struct pending_template GTY (()) {
+struct GTY (()) pending_template {
struct pending_template *next;
struct tinst_level *tinst;
};
diff --git a/gcc/cp/rtti.c b/gcc/cp/rtti.c
index 68419fa8319..9246fc2854d 100644
--- a/gcc/cp/rtti.c
+++ b/gcc/cp/rtti.c
@@ -64,8 +64,7 @@ along with GCC; see the file COPYING3. If not see
translation, when we are emitting the type info objects. */
/* Auxiliary data we hold for each type_info derived object we need. */
-typedef struct tinfo_s GTY (())
-{
+typedef struct GTY (()) tinfo_s {
tree type; /* The RECORD_TYPE for this type_info object */
tree vtable; /* The VAR_DECL of the vtable. Only filled at end of
diff --git a/gcc/cp/semantics.c b/gcc/cp/semantics.c
index 0183239f359..47d9a24d606 100644
--- a/gcc/cp/semantics.c
+++ b/gcc/cp/semantics.c
@@ -108,8 +108,7 @@ static tree finalize_nrv_r (tree *, int *, void *);
In case of parsing error, we simply call `pop_deferring_access_checks'
without `perform_deferred_access_checks'. */
-typedef struct deferred_access GTY(())
-{
+typedef struct GTY(()) deferred_access {
/* A VEC representing name-lookups for which we have deferred
checking access controls. We cannot check the accessibility of
names used in a decl-specifier-seq until we know what is being
diff --git a/gcc/cp/typeck2.c b/gcc/cp/typeck2.c
index 747c964706c..5ed7818732f 100644
--- a/gcc/cp/typeck2.c
+++ b/gcc/cp/typeck2.c
@@ -112,8 +112,7 @@ readonly_error (tree arg, const char* string)
/* Structure that holds information about declarations whose type was
incomplete and we could not check whether it was abstract or not. */
-struct pending_abstract_type GTY((chain_next ("%h.next")))
-{
+struct GTY((chain_next ("%h.next"))) pending_abstract_type {
/* Declaration which we are checking for abstractness. It is either
a DECL node, or an IDENTIFIER_NODE if we do not have a full
declaration available. */
diff --git a/gcc/cselib.h b/gcc/cselib.h
index 59ccec6f179..fccc6a2cd32 100644
--- a/gcc/cselib.h
+++ b/gcc/cselib.h
@@ -19,8 +19,7 @@ along with GCC; see the file COPYING3. If not see
<http://www.gnu.org/licenses/>. */
/* Describe a value. */
-typedef struct cselib_val_struct GTY(())
-{
+typedef struct GTY(()) cselib_val_struct {
/* The hash value. */
unsigned int value;
@@ -39,8 +38,7 @@ typedef struct cselib_val_struct GTY(())
} cselib_val;
/* A list of rtl expressions that hold the same value. */
-struct elt_loc_list GTY(())
-{
+struct GTY(()) elt_loc_list {
/* Next element in the list. */
struct elt_loc_list *next;
/* An rtl expression that holds the value. */
@@ -50,8 +48,7 @@ struct elt_loc_list GTY(())
};
/* A list of cselib_val structures. */
-struct elt_list GTY(())
-{
+struct GTY(()) elt_list {
struct elt_list *next;
cselib_val *elt;
};
diff --git a/gcc/dbxout.c b/gcc/dbxout.c
index edad611f089..dd05076bb63 100644
--- a/gcc/dbxout.c
+++ b/gcc/dbxout.c
@@ -171,8 +171,7 @@ enum typestatus {TYPE_UNSEEN, TYPE_XREF, TYPE_DEFINED};
The file_number and type_number elements are used if DBX_USE_BINCL
is defined. */
-struct typeinfo GTY(())
-{
+struct GTY(()) typeinfo {
enum typestatus status;
int file_number;
int type_number;
diff --git a/gcc/doc/gty.texi b/gcc/doc/gty.texi
index c5c0f9ed051..ef7a5d42fdb 100644
--- a/gcc/doc/gty.texi
+++ b/gcc/doc/gty.texi
@@ -46,12 +46,12 @@ In a structure field definition, before the name of the field.
Here are some examples of marking simple data structures and globals.
@smallexample
-struct @var{tag} GTY(())
+struct GTY(()) @var{tag}
@{
@var{fields}@dots{}
@};
-typedef struct @var{tag} GTY(())
+typedef struct GTY(()) @var{tag}
@{
@var{fields}@dots{}
@} *@var{typename};
@@ -136,7 +136,7 @@ There are two places the type machinery will need to be explicitly told
the length of an array. The first case is when a structure ends in a
variable-length array, like this:
@smallexample
-struct rtvec_def GTY(()) @{
+struct GTY(()) rtvec_def @{
int num_elem; /* @r{number of elements} */
rtx GTY ((length ("%h.num_elem"))) elem[1];
@};
@@ -194,7 +194,7 @@ constant.
For example,
@smallexample
-struct tree_binding GTY(())
+struct GTY(()) tree_binding
@{
struct tree_common common;
union tree_binding_u @{
diff --git a/gcc/dwarf2out.c b/gcc/dwarf2out.c
index f2da4ac1f50..b55d5ff76a5 100644
--- a/gcc/dwarf2out.c
+++ b/gcc/dwarf2out.c
@@ -220,8 +220,7 @@ enum dw_cfi_oprnd_type {
dw_cfi_oprnd_loc
};
-typedef union dw_cfi_oprnd_struct GTY(())
-{
+typedef union GTY(()) dw_cfi_oprnd_struct {
unsigned int GTY ((tag ("dw_cfi_oprnd_reg_num"))) dw_cfi_reg_num;
HOST_WIDE_INT GTY ((tag ("dw_cfi_oprnd_offset"))) dw_cfi_offset;
const char * GTY ((tag ("dw_cfi_oprnd_addr"))) dw_cfi_addr;
@@ -229,8 +228,7 @@ typedef union dw_cfi_oprnd_struct GTY(())
}
dw_cfi_oprnd;
-typedef struct dw_cfi_struct GTY(())
-{
+typedef struct GTY(()) dw_cfi_struct {
dw_cfi_ref dw_cfi_next;
enum dwarf_call_frame_info dw_cfi_opc;
dw_cfi_oprnd GTY ((desc ("dw_cfi_oprnd1_desc (%1.dw_cfi_opc)")))
@@ -245,8 +243,7 @@ dw_cfi_node;
It can now be either REG + CFA_OFFSET or *(REG + BASE_OFFSET) + CFA_OFFSET.
Instead of passing around REG and OFFSET, we pass a copy
of this structure. */
-typedef struct cfa_loc GTY(())
-{
+typedef struct GTY(()) cfa_loc {
HOST_WIDE_INT offset;
HOST_WIDE_INT base_offset;
unsigned int reg;
@@ -259,8 +256,7 @@ typedef struct cfa_loc GTY(())
CIE obviates the need to keep track of multiple CIE's
in the DWARF generation routines below. */
-typedef struct dw_fde_struct GTY(())
-{
+typedef struct GTY(()) dw_fde_struct {
tree decl;
const char *dw_fde_begin;
const char *dw_fde_current_label;
@@ -376,8 +372,7 @@ static GTY(()) dw_cfi_ref cie_cfi_head;
static unsigned current_funcdef_fde;
#endif
-struct indirect_string_node GTY(())
-{
+struct GTY(()) indirect_string_node {
const char *str;
unsigned int refcount;
unsigned int form;
@@ -1498,8 +1493,7 @@ dwarf2out_args_size_adjust (HOST_WIDE_INT offset, const char *label)
of the prologue or (b) the register is clobbered. This clusters
register saves so that there are fewer pc advances. */
-struct queued_reg_save GTY(())
-{
+struct GTY(()) queued_reg_save {
struct queued_reg_save *next;
rtx reg;
HOST_WIDE_INT cfa_offset;
@@ -1509,7 +1503,7 @@ struct queued_reg_save GTY(())
static GTY(()) struct queued_reg_save *queued_reg_saves;
/* The caller's ORIG_REG is saved in SAVED_IN_REG. */
-struct reg_saved_in_data GTY(()) {
+struct GTY(()) reg_saved_in_data {
rtx orig_reg;
rtx saved_in_reg;
};
@@ -3388,8 +3382,7 @@ dwarf2out_switch_text_section (void)
for emitting location expressions. */
/* Data about a single source file. */
-struct dwarf_file_data GTY(())
-{
+struct GTY(()) dwarf_file_data {
const char * filename;
int emitted_number;
};
@@ -3405,7 +3398,7 @@ typedef const struct die_struct *const_dw_die_ref;
typedef struct dw_loc_descr_struct *dw_loc_descr_ref;
typedef struct dw_loc_list_struct *dw_loc_list_ref;
-typedef struct deferred_locations_struct GTY(())
+typedef struct GTY(()) deferred_locations_struct
{
tree variable;
dw_die_ref die;
@@ -3444,8 +3437,7 @@ enum dw_val_class
/* Describe a double word constant value. */
/* ??? Every instance of long_long in the code really means CONST_DOUBLE. */
-typedef struct dw_long_long_struct GTY(())
-{
+typedef struct GTY(()) dw_long_long_struct {
unsigned long hi;
unsigned long low;
}
@@ -3453,8 +3445,7 @@ dw_long_long_const;
/* Describe a floating point constant value, or a vector constant value. */
-typedef struct dw_vec_struct GTY(())
-{
+typedef struct GTY(()) dw_vec_struct {
unsigned char * GTY((length ("%h.length"))) array;
unsigned length;
unsigned elt_size;
@@ -3464,8 +3455,7 @@ dw_vec_const;
/* The dw_val_node describes an attribute's value, as it is
represented internally. */
-typedef struct dw_val_struct GTY(())
-{
+typedef struct GTY(()) dw_val_struct {
enum dw_val_class val_class;
union dw_val_struct_union
{
@@ -3495,8 +3485,7 @@ dw_val_node;
/* Locations in memory are described using a sequence of stack machine
operations. */
-typedef struct dw_loc_descr_struct GTY(())
-{
+typedef struct GTY(()) dw_loc_descr_struct {
dw_loc_descr_ref dw_loc_next;
enum dwarf_location_atom dw_loc_opc;
int dw_loc_addr;
@@ -3508,8 +3497,7 @@ dw_loc_descr_node;
/* Location lists are ranges + location descriptions for that range,
so you can track variables that are in different places over
their entire life. */
-typedef struct dw_loc_list_struct GTY(())
-{
+typedef struct GTY(()) dw_loc_list_struct {
dw_loc_list_ref dw_loc_next;
const char *begin; /* Label for begin address of range */
const char *end; /* Label for end address of range */
@@ -4617,8 +4605,7 @@ typedef struct dw_ranges_by_label_struct *dw_ranges_by_label_ref;
entry. The label gives the PC value associated with
the line number entry. */
-typedef struct dw_line_info_struct GTY(())
-{
+typedef struct GTY(()) dw_line_info_struct {
unsigned long dw_file_num;
unsigned long dw_line_num;
}
@@ -4626,8 +4613,7 @@ dw_line_info_entry;
/* Line information for functions in separate sections; each one gets its
own sequence. */
-typedef struct dw_separate_line_info_struct GTY(())
-{
+typedef struct GTY(()) dw_separate_line_info_struct {
unsigned long dw_file_num;
unsigned long dw_line_num;
unsigned long function;
@@ -4638,8 +4624,7 @@ dw_separate_line_info_entry;
a link to the next attribute in the chain, and an attribute value.
Attributes are typically linked below the DIE they modify. */
-typedef struct dw_attr_struct GTY(())
-{
+typedef struct GTY(()) dw_attr_struct {
enum dwarf_attribute dw_attr;
dw_val_node dw_attr_val;
}
@@ -4652,8 +4637,7 @@ DEF_VEC_ALLOC_O(dw_attr_node,gc);
The children of each node form a circular list linked by
die_sib. die_child points to the node *before* the "first" child node. */
-typedef struct die_struct GTY((chain_circular ("%h.die_sib")))
-{
+typedef struct GTY((chain_circular ("%h.die_sib"))) die_struct {
enum dwarf_tag die_tag;
char *die_symbol;
VEC(dw_attr_node,gc) * die_attr;
@@ -4681,8 +4665,7 @@ die_node;
/* The pubname structure */
-typedef struct pubname_struct GTY(())
-{
+typedef struct GTY(()) pubname_struct {
dw_die_ref die;
const char *name;
}
@@ -4691,22 +4674,19 @@ pubname_entry;
DEF_VEC_O(pubname_entry);
DEF_VEC_ALLOC_O(pubname_entry, gc);
-struct dw_ranges_struct GTY(())
-{
+struct GTY(()) dw_ranges_struct {
/* If this is positive, it's a block number, otherwise it's a
bitwise-negated index into dw_ranges_by_label. */
int num;
};
-struct dw_ranges_by_label_struct GTY(())
-{
+struct GTY(()) dw_ranges_by_label_struct {
const char *begin;
const char *end;
};
/* The limbo die list structure. */
-typedef struct limbo_die_struct GTY(())
-{
+typedef struct GTY(()) limbo_die_struct {
dw_die_ref die;
tree created_for;
struct limbo_die_struct *next;
@@ -4811,8 +4791,7 @@ static GTY ((param_is (struct die_struct))) htab_t decl_die_table;
static GTY ((param_is (struct die_struct))) htab_t common_block_die_table;
/* Node of the variable location list. */
-struct var_loc_node GTY ((chain_next ("%h.next")))
-{
+struct GTY ((chain_next ("%h.next"))) var_loc_node {
rtx GTY (()) var_loc_note;
const char * GTY (()) label;
const char * GTY (()) section_label;
@@ -4820,8 +4799,7 @@ struct var_loc_node GTY ((chain_next ("%h.next")))
};
/* Variable location list. */
-struct var_loc_list_def GTY (())
-{
+struct GTY (()) var_loc_list_def {
struct var_loc_node * GTY (()) first;
/* Do not mark the last element of the chained list because
diff --git a/gcc/except.c b/gcc/except.c
index bec73834e23..0a2bf3284c0 100644
--- a/gcc/except.c
+++ b/gcc/except.c
@@ -96,8 +96,7 @@ tree (*lang_eh_runtime_type) (tree);
/* A hash table of label to region number. */
-struct ehl_map_entry GTY(())
-{
+struct GTY(()) ehl_map_entry {
rtx label;
struct eh_region *region;
};
@@ -115,7 +114,7 @@ static int sjlj_fc_lsda_ofs;
static int sjlj_fc_jbuf_ofs;
-struct call_site_record GTY(())
+struct GTY(()) call_site_record
{
rtx landing_pad;
int action;
@@ -1207,8 +1206,7 @@ lookup_type_for_runtime (tree type)
/* Represent an entry in @TTypes for either catch actions
or exception filter actions. */
-struct ttypes_filter GTY(())
-{
+struct GTY(()) ttypes_filter {
tree t;
int filter;
};
diff --git a/gcc/except.h b/gcc/except.h
index cf83af944a6..ba75d306976 100644
--- a/gcc/except.h
+++ b/gcc/except.h
@@ -25,7 +25,7 @@ along with GCC; see the file COPYING3. If not see
struct function;
/* Describes one exception region. */
-struct eh_region GTY(())
+struct GTY(()) eh_region
{
/* The immediately surrounding region. */
struct eh_region *outer;
@@ -115,7 +115,7 @@ DEF_VEC_ALLOC_P(eh_region, heap);
/* Per-function EH data. Used to save exception status for each
function. */
-struct eh_status GTY(())
+struct GTY(()) eh_status
{
/* The tree of all regions for this function. */
struct eh_region *region_tree;
@@ -264,8 +264,7 @@ extern tree (*lang_eh_runtime_type) (tree);
# define USING_SJLJ_EXCEPTIONS MUST_USE_SJLJ_EXCEPTIONS
#endif
-struct throw_stmt_node GTY(())
-{
+struct GTY(()) throw_stmt_node {
gimple stmt;
int region_nr;
};
diff --git a/gcc/fixed-value.h b/gcc/fixed-value.h
index d6e67794b04..ca0ee93d48a 100644
--- a/gcc/fixed-value.h
+++ b/gcc/fixed-value.h
@@ -24,7 +24,7 @@ along with GCC; see the file COPYING3. If not see
#include "real.h"
#include "double-int.h"
-struct fixed_value GTY(())
+struct GTY(()) fixed_value
{
double_int data; /* Store data up to 2 wide integers. */
enum machine_mode mode; /* Use machine mode to know IBIT and FBIT. */
diff --git a/gcc/fortran/ChangeLog b/gcc/fortran/ChangeLog
index 5932195ac5e..2932af3fdac 100644
--- a/gcc/fortran/ChangeLog
+++ b/gcc/fortran/ChangeLog
@@ -1,3 +1,10 @@
+2009-04-21 Taras Glek <tglek@mozilla.com>
+
+ * f95-lang.c: Update GTY annotations to new syntax.
+ * trans-intrinsic.c: Likewise.
+ * trans-io.c: Likewise.
+ * trans.h: Likewise.
+
2009-04-22 Janus Weil <janus@gcc.gnu.org>
PR fortran/39735
diff --git a/gcc/fortran/f95-lang.c b/gcc/fortran/f95-lang.c
index b8f2d221801..1aab3bf6cc3 100644
--- a/gcc/fortran/f95-lang.c
+++ b/gcc/fortran/f95-lang.c
@@ -52,19 +52,17 @@ along with GCC; see the file COPYING3. If not see
/* Language-dependent contents of an identifier. */
-struct lang_identifier
-GTY(())
-{
+struct GTY(())
+lang_identifier {
struct tree_identifier common;
};
/* The resulting tree type. */
-union lang_tree_node
-GTY((desc ("TREE_CODE (&%h.generic) == IDENTIFIER_NODE"),
+union GTY((desc ("TREE_CODE (&%h.generic) == IDENTIFIER_NODE"),
chain_next ("(union lang_tree_node *)TREE_CHAIN (&%h.generic)")))
-{
+lang_tree_node {
union tree_node GTY((tag ("0"),
desc ("tree_node_structure (&%h)"))) generic;
struct lang_identifier GTY((tag ("1"))) identifier;
@@ -74,9 +72,8 @@ GTY((desc ("TREE_CODE (&%h.generic) == IDENTIFIER_NODE"),
that keep track of the progress of compilation of the current function.
Used for nested functions. */
-struct language_function
-GTY(())
-{
+struct GTY(())
+language_function {
/* struct gfc_language_function base; */
struct binding_level *binding_level;
};
@@ -309,9 +306,8 @@ gfc_print_identifier (FILE * file ATTRIBUTE_UNUSED,
Binding contours are used to create GCC tree BLOCK nodes. */
-struct binding_level
-GTY(())
-{
+struct GTY(())
+binding_level {
/* A chain of ..._DECL nodes for all variables, constants, functions,
parameters and type declarations. These ..._DECL nodes are chained
through the TREE_CHAIN field. Note that these ..._DECL nodes are stored
diff --git a/gcc/fortran/trans-intrinsic.c b/gcc/fortran/trans-intrinsic.c
index 47960e90bbd..8705b94dd8d 100644
--- a/gcc/fortran/trans-intrinsic.c
+++ b/gcc/fortran/trans-intrinsic.c
@@ -45,8 +45,7 @@ along with GCC; see the file COPYING3. If not see
/* This maps fortran intrinsic math functions to external library or GCC
builtin functions. */
-typedef struct gfc_intrinsic_map_t GTY(())
-{
+typedef struct GTY(()) gfc_intrinsic_map_t {
/* The explicit enum is required to work around inadequacies in the
garbage collection/gengtype parsing mechanism. */
enum gfc_isym_id id;
diff --git a/gcc/fortran/trans-io.c b/gcc/fortran/trans-io.c
index 40cb1f28d43..b8ff5f36f53 100644
--- a/gcc/fortran/trans-io.c
+++ b/gcc/fortran/trans-io.c
@@ -64,8 +64,7 @@ enum iofield_type
IOPARM_type_num
};
-typedef struct gfc_st_parameter_field GTY(())
-{
+typedef struct GTY(()) gfc_st_parameter_field {
const char *name;
unsigned int mask;
enum ioparam_type param_type;
@@ -75,8 +74,7 @@ typedef struct gfc_st_parameter_field GTY(())
}
gfc_st_parameter_field;
-typedef struct gfc_st_parameter GTY(())
-{
+typedef struct GTY(()) gfc_st_parameter {
const char *name;
tree type;
}
diff --git a/gcc/fortran/trans.h b/gcc/fortran/trans.h
index 2c531ec2636..b6b3279b4a9 100644
--- a/gcc/fortran/trans.h
+++ b/gcc/fortran/trans.h
@@ -429,8 +429,7 @@ void gfc_generate_block_data (gfc_namespace *);
/* Output a decl for a module variable. */
void gfc_generate_module_vars (gfc_namespace *);
-struct module_htab_entry GTY(())
-{
+struct GTY(()) module_htab_entry {
const char *name;
tree namespace_decl;
htab_t GTY ((param_is (union tree_node))) decls;
@@ -543,8 +542,7 @@ extern GTY(()) tree gfor_fndecl_associated;
/* Math functions. Many other math functions are handled in
trans-intrinsic.c. */
-typedef struct gfc_powdecl_list GTY(())
-{
+typedef struct GTY(()) gfc_powdecl_list {
tree integer;
tree real;
tree cmplx;
@@ -615,8 +613,7 @@ enum gfc_array_kind
};
/* Array types only. */
-struct lang_type GTY(())
-{
+struct GTY(()) lang_type {
int rank;
enum gfc_array_kind akind;
tree lbound[GFC_MAX_DIMENSIONS];
@@ -629,8 +626,7 @@ struct lang_type GTY(())
tree span;
};
-struct lang_decl GTY(())
-{
+struct GTY(()) lang_decl {
/* Dummy variables. */
tree saved_descriptor;
/* Assigned integer nodes. Stringlength is the IO format string's length.
diff --git a/gcc/function.c b/gcc/function.c
index 60b734827c3..9d9d3ad5066 100644
--- a/gcc/function.c
+++ b/gcc/function.c
@@ -450,8 +450,7 @@ assign_stack_local (enum machine_mode mode, HOST_WIDE_INT size, int align)
level where they are defined. They are marked a "kept" so that
free_temp_slots will not free them. */
-struct temp_slot GTY(())
-{
+struct GTY(()) temp_slot {
/* Points to next temporary slot. */
struct temp_slot *next;
/* Points to previous temporary slot. */
@@ -488,8 +487,7 @@ struct temp_slot GTY(())
static GTY((param_is(struct temp_slot_address_entry))) htab_t temp_slot_address_table;
/* Entry for the above hash table. */
-struct temp_slot_address_entry GTY(())
-{
+struct GTY(()) temp_slot_address_entry {
hashval_t hash;
rtx address;
struct temp_slot *temp_slot;
diff --git a/gcc/function.h b/gcc/function.h
index 77b1ae813c0..cd9f59eece6 100644
--- a/gcc/function.h
+++ b/gcc/function.h
@@ -31,16 +31,14 @@ along with GCC; see the file COPYING3. If not see
The main insn-chain is saved in the last element of the chain,
unless the chain is empty. */
-struct sequence_stack GTY(())
-{
+struct GTY(()) sequence_stack {
/* First and last insns in the chain of the saved sequence. */
rtx first;
rtx last;
struct sequence_stack *next;
};
-struct emit_status GTY(())
-{
+struct GTY(()) emit_status {
/* This is reset to LAST_VIRTUAL_REGISTER + 1 at the start of each function.
After rtl generation, it is 1 plus the largest register number used. */
int x_reg_rtx_no;
@@ -96,8 +94,7 @@ extern GTY ((length ("crtl->emit.x_reg_rtx_no"))) rtx * regno_reg_rtx;
#define REGNO_POINTER_ALIGN(REGNO) (crtl->emit.regno_pointer_align[REGNO])
-struct expr_status GTY(())
-{
+struct GTY(()) expr_status {
/* Number of units that we should eventually pop off the stack.
These are the arguments to function calls that have already returned. */
int x_pending_stack_adjust;
@@ -142,8 +139,7 @@ DEF_VEC_P(call_site_record);
DEF_VEC_ALLOC_P(call_site_record, gc);
/* RTL representation of exception handling. */
-struct rtl_eh GTY(())
-{
+struct GTY(()) rtl_eh {
rtx filter;
rtx exc_ptr;
@@ -194,8 +190,7 @@ enum function_frequency {
FUNCTION_FREQUENCY_HOT
};
-struct varasm_status GTY(())
-{
+struct GTY(()) varasm_status {
/* If we're using a per-function constant pool, this is it. */
struct rtx_constant_pool *pool;
@@ -205,8 +200,7 @@ struct varasm_status GTY(())
};
/* Information mainlined about RTL representation of incoming arguments. */
-struct incoming_args GTY(())
-{
+struct GTY(()) incoming_args {
/* Number of bytes of args popped by function being compiled on its return.
Zero if no bytes are to be popped.
May affect compilation of return insn or of function epilogue. */
@@ -235,8 +229,7 @@ struct incoming_args GTY(())
};
/* Data for function partitioning. */
-struct function_subsections GTY(())
-{
+struct GTY(()) function_subsections {
/* Assembly labels for the hot and cold text sections, to
be used by debugger functions for determining the size of text
sections. */
@@ -253,8 +246,7 @@ struct function_subsections GTY(())
};
/* Datastructures maintained for currently processed function in RTL form. */
-struct rtl_data GTY(())
-{
+struct GTY(()) rtl_data {
struct expr_status expr;
struct emit_status emit;
struct varasm_status varasm;
@@ -471,8 +463,7 @@ extern GTY(()) struct rtl_data x_rtl;
/* This structure can save all the important global and static variables
describing the status of the current function. */
-struct function GTY(())
-{
+struct GTY(()) function {
struct eh_status *eh;
/* The control flow graph for this function. */
diff --git a/gcc/gengtype-lex.l b/gcc/gengtype-lex.l
index d9f1996ccc9..da118d02b28 100644
--- a/gcc/gengtype-lex.l
+++ b/gcc/gengtype-lex.l
@@ -189,9 +189,6 @@ EOID [^[:alnum:]_]
}
^{HWS}"#"{HWS}"define"{WS}"GTY(" /* do nothing */
-{WS}"GTY"{WS}?"(" {
- error_at_line (&lexer_line, "stray GTY marker");
-}
%%
diff --git a/gcc/gengtype-parse.c b/gcc/gengtype-parse.c
index 357981ad3cb..6b0cd2e1a24 100644
--- a/gcc/gengtype-parse.c
+++ b/gcc/gengtype-parse.c
@@ -677,7 +677,6 @@ static type_p
type (options_p *optsp, bool nested)
{
const char *s;
- bool is_union;
*optsp = 0;
switch (token ())
{
@@ -694,15 +693,17 @@ type (options_p *optsp, bool nested)
case UNION:
{
options_p opts = 0;
-
- is_union = (token() == UNION);
+ /* GTY annotations follow attribute syntax
+ GTY_BEFORE_ID is for union/struct declarations
+ GTY_AFTER_ID is for variable declarations. */
+ enum {
+ NO_GTY,
+ GTY_BEFORE_ID,
+ GTY_AFTER_ID
+ } is_gty = NO_GTY;
+ bool is_union = (token () == UNION);
advance ();
- if (token () == ID)
- s = advance ();
- else
- s = xasprintf ("anonymous:%s:%d", lexer_line.file, lexer_line.line);
-
/* Top-level structures that are not explicitly tagged GTY(())
are treated as mere forward declarations. This is because
there are a lot of structures that we don't need to know
@@ -710,18 +711,40 @@ type (options_p *optsp, bool nested)
that we can't handle. */
if (nested || token () == GTY_TOKEN)
{
- opts = gtymarker_opt ();
- if (token () == '{')
- {
- pair_p fields;
- advance ();
- fields = struct_field_seq ();
- require ('}');
- return new_structure (s, is_union, &lexer_line, fields, opts);
- }
+ is_gty = GTY_BEFORE_ID;
+ opts = gtymarker_opt ();
}
- else if (token () == '{')
- consume_balanced ('{', '}');
+
+ if (token () == ID)
+ s = advance ();
+ else
+ s = xasprintf ("anonymous:%s:%d", lexer_line.file, lexer_line.line);
+
+ /* Unfortunately above GTY_TOKEN check does not capture the
+ typedef struct_type GTY case. */
+ if (token () == GTY_TOKEN)
+ {
+ is_gty = GTY_AFTER_ID;
+ opts = gtymarker_opt ();
+ }
+
+ if (is_gty)
+ {
+ if (token () == '{')
+ {
+ pair_p fields;
+
+ if (is_gty == GTY_AFTER_ID)
+ parse_error ("GTY must be specified before identifier");
+
+ advance ();
+ fields = struct_field_seq ();
+ require ('}');
+ return new_structure (s, is_union, &lexer_line, fields, opts);
+ }
+ }
+ else if (token () == '{')
+ consume_balanced ('{', '}');
if (opts)
*optsp = opts;
return find_structure (s, is_union);
diff --git a/gcc/gimple.h b/gcc/gimple.h
index 05c514e438e..5a4cb3e9ba5 100644
--- a/gcc/gimple.h
+++ b/gcc/gimple.h
@@ -125,16 +125,14 @@ enum plf_mask {
};
/* A node in a gimple_seq_d. */
-struct gimple_seq_node_d GTY((chain_next ("%h.next"), chain_prev ("%h.prev")))
-{
+struct GTY((chain_next ("%h.next"), chain_prev ("%h.prev"))) gimple_seq_node_d {
gimple stmt;
struct gimple_seq_node_d *prev;
struct gimple_seq_node_d *next;
};
/* A double-linked sequence of gimple statements. */
-struct gimple_seq_d GTY ((chain_next ("%h.next_free")))
-{
+struct GTY ((chain_next ("%h.next_free"))) gimple_seq_d {
/* First and last statements in the sequence. */
gimple_seq_node first;
gimple_seq_node last;
@@ -262,8 +260,7 @@ typedef struct
/* Data structure definitions for GIMPLE tuples. NOTE: word markers
are for 64 bit hosts. */
-struct gimple_statement_base GTY(())
-{
+struct GTY(()) gimple_statement_base {
/* [ WORD 1 ]
Main identifying code for a tuple. */
ENUM_BITFIELD(gimple_code) code : 8;
@@ -325,7 +322,7 @@ struct gimple_statement_base GTY(())
/* Base structure for tuples with operands. */
-struct gimple_statement_with_ops_base GTY(())
+struct GTY(()) gimple_statement_with_ops_base
{
/* [ WORD 1-4 ] */
struct gimple_statement_base gsbase;
@@ -342,7 +339,7 @@ struct gimple_statement_with_ops_base GTY(())
/* Statements that take register operands. */
-struct gimple_statement_with_ops GTY(())
+struct GTY(()) gimple_statement_with_ops
{
/* [ WORD 1-6 ] */
struct gimple_statement_with_ops_base opbase;
@@ -357,7 +354,7 @@ struct gimple_statement_with_ops GTY(())
/* Base for statements that take both memory and register operands. */
-struct gimple_statement_with_memory_ops_base GTY(())
+struct GTY(()) gimple_statement_with_memory_ops_base
{
/* [ WORD 1-6 ] */
struct gimple_statement_with_ops_base opbase;
@@ -372,7 +369,7 @@ struct gimple_statement_with_memory_ops_base GTY(())
/* Statements that take both memory and register operands. */
-struct gimple_statement_with_memory_ops GTY(())
+struct GTY(()) gimple_statement_with_memory_ops
{
/* [ WORD 1-8 ] */
struct gimple_statement_with_memory_ops_base membase;
@@ -387,8 +384,7 @@ struct gimple_statement_with_memory_ops GTY(())
/* OpenMP statements (#pragma omp). */
-struct gimple_statement_omp GTY(())
-{
+struct GTY(()) gimple_statement_omp {
/* [ WORD 1-4 ] */
struct gimple_statement_base gsbase;
@@ -399,8 +395,7 @@ struct gimple_statement_omp GTY(())
/* GIMPLE_BIND */
-struct gimple_statement_bind GTY(())
-{
+struct GTY(()) gimple_statement_bind {
/* [ WORD 1-4 ] */
struct gimple_statement_base gsbase;
@@ -423,8 +418,7 @@ struct gimple_statement_bind GTY(())
/* GIMPLE_CATCH */
-struct gimple_statement_catch GTY(())
-{
+struct GTY(()) gimple_statement_catch {
/* [ WORD 1-4 ] */
struct gimple_statement_base gsbase;
@@ -438,8 +432,7 @@ struct gimple_statement_catch GTY(())
/* GIMPLE_EH_FILTER */
-struct gimple_statement_eh_filter GTY(())
-{
+struct GTY(()) gimple_statement_eh_filter {
/* [ WORD 1-4 ] */
struct gimple_statement_base gsbase;
@@ -458,8 +451,7 @@ struct gimple_statement_eh_filter GTY(())
/* GIMPLE_PHI */
-struct gimple_statement_phi GTY(())
-{
+struct GTY(()) gimple_statement_phi {
/* [ WORD 1-4 ] */
struct gimple_statement_base gsbase;
@@ -477,8 +469,7 @@ struct gimple_statement_phi GTY(())
/* GIMPLE_RESX */
-struct gimple_statement_resx GTY(())
-{
+struct GTY(()) gimple_statement_resx {
/* [ WORD 1-4 ] */
struct gimple_statement_base gsbase;
@@ -490,8 +481,7 @@ struct gimple_statement_resx GTY(())
/* GIMPLE_TRY */
-struct gimple_statement_try GTY(())
-{
+struct GTY(()) gimple_statement_try {
/* [ WORD 1-4 ] */
struct gimple_statement_base gsbase;
@@ -520,8 +510,7 @@ enum gimple_try_flags
/* GIMPLE_WITH_CLEANUP_EXPR */
-struct gimple_statement_wce GTY(())
-{
+struct GTY(()) gimple_statement_wce {
/* [ WORD 1-4 ] */
struct gimple_statement_base gsbase;
@@ -538,7 +527,7 @@ struct gimple_statement_wce GTY(())
/* GIMPLE_ASM */
-struct gimple_statement_asm GTY(())
+struct GTY(()) gimple_statement_asm
{
/* [ WORD 1-8 ] */
struct gimple_statement_with_memory_ops_base membase;
@@ -562,8 +551,7 @@ struct gimple_statement_asm GTY(())
/* GIMPLE_OMP_CRITICAL */
-struct gimple_statement_omp_critical GTY(())
-{
+struct GTY(()) gimple_statement_omp_critical {
/* [ WORD 1-5 ] */
struct gimple_statement_omp omp;
@@ -573,8 +561,7 @@ struct gimple_statement_omp_critical GTY(())
};
-struct gimple_omp_for_iter GTY(())
-{
+struct GTY(()) gimple_omp_for_iter {
/* Condition code. */
enum tree_code cond;
@@ -593,8 +580,7 @@ struct gimple_omp_for_iter GTY(())
/* GIMPLE_OMP_FOR */
-struct gimple_statement_omp_for GTY(())
-{
+struct GTY(()) gimple_statement_omp_for {
/* [ WORD 1-5 ] */
struct gimple_statement_omp omp;
@@ -616,8 +602,7 @@ struct gimple_statement_omp_for GTY(())
/* GIMPLE_OMP_PARALLEL */
-struct gimple_statement_omp_parallel GTY(())
-{
+struct GTY(()) gimple_statement_omp_parallel {
/* [ WORD 1-5 ] */
struct gimple_statement_omp omp;
@@ -637,8 +622,7 @@ struct gimple_statement_omp_parallel GTY(())
/* GIMPLE_OMP_TASK */
-struct gimple_statement_omp_task GTY(())
-{
+struct GTY(()) gimple_statement_omp_task {
/* [ WORD 1-8 ] */
struct gimple_statement_omp_parallel par;
@@ -659,8 +643,7 @@ struct gimple_statement_omp_task GTY(())
/* GIMPLE_OMP_SECTIONS */
-struct gimple_statement_omp_sections GTY(())
-{
+struct GTY(()) gimple_statement_omp_sections {
/* [ WORD 1-5 ] */
struct gimple_statement_omp omp;
@@ -678,8 +661,7 @@ struct gimple_statement_omp_sections GTY(())
Note: This does not inherit from gimple_statement_omp, because we
do not need the body field. */
-struct gimple_statement_omp_continue GTY(())
-{
+struct GTY(()) gimple_statement_omp_continue {
/* [ WORD 1-4 ] */
struct gimple_statement_base gsbase;
@@ -692,8 +674,7 @@ struct gimple_statement_omp_continue GTY(())
/* GIMPLE_OMP_SINGLE */
-struct gimple_statement_omp_single GTY(())
-{
+struct GTY(()) gimple_statement_omp_single {
/* [ WORD 1-5 ] */
struct gimple_statement_omp omp;
@@ -706,8 +687,7 @@ struct gimple_statement_omp_single GTY(())
Note: This is based on gimple_statement_base, not g_s_omp, because g_s_omp
contains a sequence, which we don't need here. */
-struct gimple_statement_omp_atomic_load GTY(())
-{
+struct GTY(()) gimple_statement_omp_atomic_load {
/* [ WORD 1-4 ] */
struct gimple_statement_base gsbase;
@@ -718,8 +698,7 @@ struct gimple_statement_omp_atomic_load GTY(())
/* GIMPLE_OMP_ATOMIC_STORE.
See note on GIMPLE_OMP_ATOMIC_LOAD. */
-struct gimple_statement_omp_atomic_store GTY(())
-{
+struct GTY(()) gimple_statement_omp_atomic_store {
/* [ WORD 1-4 ] */
struct gimple_statement_base gsbase;
@@ -738,8 +717,7 @@ enum gimple_statement_structure_enum {
/* Define the overall contents of a gimple tuple. It may be any of the
structures declared above for various types of tuples. */
-union gimple_statement_d GTY ((desc ("gimple_statement_structure (&%h)")))
-{
+union GTY ((desc ("gimple_statement_structure (&%h)"))) gimple_statement_d {
struct gimple_statement_base GTY ((tag ("GSS_BASE"))) gsbase;
struct gimple_statement_with_ops GTY ((tag ("GSS_WITH_OPS"))) gsops;
struct gimple_statement_with_memory_ops GTY ((tag ("GSS_WITH_MEM_OPS"))) gsmem;
diff --git a/gcc/integrate.c b/gcc/integrate.c
index 2d0b236a084..30ef854ffff 100644
--- a/gcc/integrate.c
+++ b/gcc/integrate.c
@@ -53,11 +53,11 @@ along with GCC; see the file COPYING3. If not see
/* Private type used by {get/has}_hard_reg_initial_val. */
-typedef struct initial_value_pair GTY(()) {
+typedef struct GTY(()) initial_value_pair {
rtx hard_reg;
rtx pseudo;
} initial_value_pair;
-typedef struct initial_value_struct GTY(()) {
+typedef struct GTY(()) initial_value_struct {
int num_entries;
int max_entries;
initial_value_pair * GTY ((length ("%h.num_entries"))) entries;
diff --git a/gcc/java/ChangeLog b/gcc/java/ChangeLog
index 6661265bf42..364ddb3a7b6 100644
--- a/gcc/java/ChangeLog
+++ b/gcc/java/ChangeLog
@@ -1,3 +1,11 @@
+2009-04-21 Taras Glek <tglek@mozilla.com>
+
+ * builtins.c: Update GTY annotations to new syntax
+ * decl.c: Likewise
+ * java-tree.h: Likewise
+ * jcf.h: Likewise
+ * lang.c: Likewise
+
2009-04-21 Joseph Myers <joseph@codesourcery.com>
* ChangeLog, ChangeLog.ptr, ChangeLog.tree-ssa: Add copyright and
diff --git a/gcc/java/builtins.c b/gcc/java/builtins.c
index 7ba12d3d431..4fac1446f97 100644
--- a/gcc/java/builtins.c
+++ b/gcc/java/builtins.c
@@ -65,15 +65,13 @@ typedef tree builtin_creator_function (tree, tree);
/* Hold a char*, before initialization, or a tree, after
initialization. */
-union string_or_tree GTY(())
-{
+union GTY(()) string_or_tree {
const char * GTY ((tag ("0"))) s;
tree GTY ((tag ("1"))) t;
};
/* Used to hold a single builtin record. */
-struct builtin_record GTY(())
-{
+struct GTY(()) builtin_record {
union string_or_tree GTY ((desc ("1"))) class_name;
union string_or_tree GTY ((desc ("1"))) method_name;
builtin_creator_function * GTY((skip)) creator;
diff --git a/gcc/java/decl.c b/gcc/java/decl.c
index bae077887bf..bd0cc8e4de6 100644
--- a/gcc/java/decl.c
+++ b/gcc/java/decl.c
@@ -351,8 +351,8 @@ find_stack_slot (int index, tree type)
type, -1);
}
-struct binding_level GTY(())
- {
+struct GTY(())
+ binding_level {
/* A chain of _DECL nodes for all variables, constants, functions,
* and typedef types. These are in the reverse of the order supplied.
*/
diff --git a/gcc/java/java-tree.h b/gcc/java/java-tree.h
index 7ae71d9e41b..9ab76606b46 100644
--- a/gcc/java/java-tree.h
+++ b/gcc/java/java-tree.h
@@ -635,8 +635,7 @@ extern GTY(()) tree java_global_trees[JTI_MAX];
/* The decl for "_Jv_ResolvePoolEntry". */
extern GTY(()) tree soft_resolvepoolentry_node;
-struct lang_identifier GTY(())
-{
+struct GTY(()) lang_identifier {
struct tree_identifier ignore;
tree global_value;
tree local_value;
@@ -647,11 +646,10 @@ struct lang_identifier GTY(())
};
/* The resulting tree type. */
-union lang_tree_node
- GTY((desc ("TREE_CODE (&%h.generic) == IDENTIFIER_NODE"),
+union GTY((desc ("TREE_CODE (&%h.generic) == IDENTIFIER_NODE"),
chain_next ("(union lang_tree_node *)TREE_CHAIN (&%h.generic)")))
-
-{
+
+ lang_tree_node {
union tree_node GTY ((tag ("0"),
desc ("tree_node_structure (&%h)")))
generic;
@@ -772,8 +770,7 @@ union lang_tree_node
|| TREE_CODE (NODE) == REAL_CST)
/* DECL_LANG_SPECIFIC for FUNCTION_DECLs. */
-struct lang_decl_func GTY(())
-{
+struct GTY(()) lang_decl_func {
/* tree chain; not yet used. */
long code_offset;
int code_length;
@@ -803,8 +800,7 @@ struct lang_decl_func GTY(())
unsigned int varargs : 1; /* Varargs method. */
};
-struct treetreehash_entry GTY(())
-{
+struct GTY(()) treetreehash_entry {
tree key;
tree value;
};
@@ -840,8 +836,7 @@ typedef enum
JV_ANNOTATION_DEFAULT_KIND
} jv_attr_kind;
-typedef struct type_assertion GTY(())
-{
+typedef struct GTY(()) type_assertion {
int assertion_code; /* 'opcode' for the type of this assertion. */
tree op1; /* First operand. */
tree op2; /* Second operand. */
@@ -853,8 +848,7 @@ extern htab_t java_treetreehash_create (size_t size, int ggc);
/* DECL_LANG_SPECIFIC for VAR_DECL, PARM_DECL and sometimes FIELD_DECL
(access methods on outer class fields) and final fields. */
-struct lang_decl_var GTY(())
-{
+struct GTY(()) lang_decl_var {
int slot_number;
int start_pc;
int end_pc;
@@ -871,8 +865,7 @@ struct lang_decl_var GTY(())
enum lang_decl_desc {LANG_DECL_FUNC, LANG_DECL_VAR};
-struct lang_decl GTY(())
-{
+struct GTY(()) lang_decl {
enum lang_decl_desc desc;
union lang_decl_u
{
@@ -927,8 +920,7 @@ struct lang_decl GTY(())
#define TYPE_REFLECTION_DATASIZE(T) \
(TYPE_LANG_SPECIFIC (T)->reflection_datasize)
-struct lang_type GTY(())
-{
+struct GTY(()) lang_type {
tree signature;
struct JCF *jcf;
struct CPool *cpool;
diff --git a/gcc/java/jcf.h b/gcc/java/jcf.h
index 40bbd725d45..7e8d18d9b3f 100644
--- a/gcc/java/jcf.h
+++ b/gcc/java/jcf.h
@@ -66,7 +66,7 @@ jcf_open_exact_case (const char* filename, int oflag);
struct JCF;
typedef int (*jcf_filbuf_t) (struct JCF*, int needed);
-union cpool_entry GTY(()) {
+union GTY(()) cpool_entry {
jword GTY ((tag ("0"))) w;
tree GTY ((tag ("1"))) t;
};
@@ -74,7 +74,7 @@ union cpool_entry GTY(()) {
#define cpool_entry_is_tree(tag) \
(tag & CONSTANT_ResolvedFlag) || tag == CONSTANT_Utf8
-typedef struct CPool GTY(()) {
+typedef struct GTY(()) CPool {
/* Available number of elements in the constants array, before it
must be re-allocated. */
int capacity;
@@ -92,7 +92,7 @@ struct ZipDirectory;
/* JCF encapsulates the state of reading a Java Class File. */
-typedef struct JCF GTY(()) {
+typedef struct GTY(()) JCF {
unsigned char * GTY ((skip)) buffer;
unsigned char * GTY ((skip)) buffer_end;
unsigned char * GTY ((skip)) read_ptr;
diff --git a/gcc/java/lang.c b/gcc/java/lang.c
index c4311412e3e..61337ccf2a9 100644
--- a/gcc/java/lang.c
+++ b/gcc/java/lang.c
@@ -111,8 +111,7 @@ static int dependency_tracking = 0;
#define DEPEND_TARGET_SET 4
#define DEPEND_FILE_ALREADY_SET 8
-struct language_function GTY(())
-{
+struct GTY(()) language_function {
int unused;
};
diff --git a/gcc/objc/ChangeLog b/gcc/objc/ChangeLog
index a018d81e8ee..9a9c875621e 100644
--- a/gcc/objc/ChangeLog
+++ b/gcc/objc/ChangeLog
@@ -1,3 +1,8 @@
+2009-04-21 Taras Glek <tglek@mozilla.com>
+
+ * objc-act.c: Update GTY annotations to new syntax
+ * objc-act.h: Likewise
+
2009-04-21 Joseph Myers <joseph@codesourcery.com>
* ChangeLog: Add copyright and license notices.
diff --git a/gcc/objc/objc-act.c b/gcc/objc/objc-act.c
index a45ff27b45d..d3c5a197203 100644
--- a/gcc/objc/objc-act.c
+++ b/gcc/objc/objc-act.c
@@ -389,8 +389,7 @@ static int flag_typed_selectors;
/* Store all constructed constant strings in a hash table so that
they get uniqued properly. */
-struct string_descriptor GTY(())
-{
+struct GTY(()) string_descriptor {
/* The literal argument . */
tree literal;
@@ -401,8 +400,7 @@ struct string_descriptor GTY(())
static GTY((param_is (struct string_descriptor))) htab_t string_htab;
/* Store the EH-volatilized types in a hash table, for easy retrieval. */
-struct volatilized_type GTY(())
-{
+struct GTY(()) volatilized_type {
tree type;
};
@@ -3297,8 +3295,7 @@ objc_generate_write_barrier (tree lhs, enum tree_code modifycode, tree rhs)
return result;
}
-struct interface_tuple GTY(())
-{
+struct GTY(()) interface_tuple {
tree id;
tree class_name;
};
diff --git a/gcc/objc/objc-act.h b/gcc/objc/objc-act.h
index 13b32fe6d51..f81559643c3 100644
--- a/gcc/objc/objc-act.h
+++ b/gcc/objc/objc-act.h
@@ -126,13 +126,11 @@ enum gimplify_status objc_gimplify_expr (tree *, gimple_seq *, gimple_seq *);
typedef struct hashed_entry *hash;
typedef struct hashed_attribute *attr;
-struct hashed_attribute GTY(())
-{
+struct GTY(()) hashed_attribute {
attr next;
tree value;
};
-struct hashed_entry GTY(())
-{
+struct GTY(()) hashed_entry {
attr list;
hash next;
tree key;
@@ -145,8 +143,7 @@ extern GTY ((length ("SIZEHASHTABLE"))) hash *cls_method_hash_list;
/* Objective-C/Objective-C++ @implementation list. */
-struct imp_entry GTY(())
-{
+struct GTY(()) imp_entry {
struct imp_entry *next;
tree imp_context;
tree imp_template;
diff --git a/gcc/optabs.c b/gcc/optabs.c
index 74c14f1d094..a8a6f485a54 100644
--- a/gcc/optabs.c
+++ b/gcc/optabs.c
@@ -132,8 +132,7 @@ void debug_optab_libfuncs (void);
/* Info about libfunc. We use same hashtable for normal optabs and conversion
optab. In the first case mode2 is unused. */
-struct libfunc_entry GTY(())
-{
+struct GTY(()) libfunc_entry {
size_t optab;
enum machine_mode mode1, mode2;
rtx libfunc;
diff --git a/gcc/opth-gen.awk b/gcc/opth-gen.awk
index b84d1f2c520..ecccbdd9ac9 100644
--- a/gcc/opth-gen.awk
+++ b/gcc/opth-gen.awk
@@ -98,7 +98,7 @@ print ""
print "#if !defined(GCC_DRIVER) && !defined(IN_LIBGCC2) && !defined(IN_TARGET_LIBS)"
print ""
print "/* Structure to save/restore optimization and target specific options. */";
-print "struct cl_optimization GTY(())";
+print "struct GTY(()) cl_optimization";
print "{";
n_opt_char = 2;
@@ -154,7 +154,7 @@ print "";
# Target and optimization save/restore/print functions.
print "/* Structure to save/restore selected target specific options. */";
-print "struct cl_target_option GTY(())";
+print "struct GTY(()) cl_target_option";
print "{";
n_target_char = 0;
diff --git a/gcc/output.h b/gcc/output.h
index 79b628fd338..e7871f980e2 100644
--- a/gcc/output.h
+++ b/gcc/output.h
@@ -470,13 +470,13 @@ enum section_category
};
/* Information that is provided by all instances of the section type. */
-struct section_common GTY(()) {
+struct GTY(()) section_common {
/* The set of SECTION_* flags that apply to this section. */
unsigned int flags;
};
/* Information about a SECTION_NAMED section. */
-struct named_section GTY(()) {
+struct GTY(()) named_section {
struct section_common common;
/* The name of the section. */
@@ -492,7 +492,7 @@ struct named_section GTY(()) {
typedef void (*unnamed_section_callback) (const void *);
/* Information about a SECTION_UNNAMED section. */
-struct unnamed_section GTY(()) {
+struct GTY(()) unnamed_section {
struct section_common common;
/* The callback used to switch to the section, and the data that
@@ -518,7 +518,7 @@ typedef bool (*noswitch_section_callback) (tree decl, const char *name,
unsigned HOST_WIDE_INT rounded);
/* Information about a SECTION_NOSWITCH section. */
-struct noswitch_section GTY(()) {
+struct GTY(()) noswitch_section {
struct section_common common;
/* The callback used to assemble decls in this section. */
@@ -526,8 +526,7 @@ struct noswitch_section GTY(()) {
};
/* Information about a section, which may be named or unnamed. */
-union section GTY ((desc ("SECTION_STYLE (&(%h))")))
-{
+union GTY ((desc ("SECTION_STYLE (&(%h))"))) section {
struct section_common GTY ((skip)) common;
struct named_section GTY ((tag ("SECTION_NAMED"))) named;
struct unnamed_section GTY ((tag ("SECTION_UNNAMED"))) unnamed;
diff --git a/gcc/real.h b/gcc/real.h
index 5a686536608..47efac5d2ae 100644
--- a/gcc/real.h
+++ b/gcc/real.h
@@ -43,8 +43,7 @@ enum real_value_class {
#define SIGSZ (SIGNIFICAND_BITS / HOST_BITS_PER_LONG)
#define SIG_MSB ((unsigned long)1 << (HOST_BITS_PER_LONG - 1))
-struct real_value GTY(())
-{
+struct GTY(()) real_value {
/* Use the same underlying type for all bit-fields, so as to make
sure they're packed together, otherwise REAL_VALUE_TYPE_SIZE will
be miscomputed. */
diff --git a/gcc/rtl.h b/gcc/rtl.h
index ff09d2aedb5..06b0caeca53 100644
--- a/gcc/rtl.h
+++ b/gcc/rtl.h
@@ -139,7 +139,7 @@ typedef struct
/* ALIGN and SIZE are the alignment and size of the MEM itself,
while EXPR can describe a larger underlying object, which might have a
stricter alignment; OFFSET is the offset of the MEM within that object. */
-typedef struct mem_attrs GTY(())
+typedef struct GTY(()) mem_attrs
{
tree expr; /* expr corresponding to MEM. */
rtx offset; /* Offset from start of DECL, as CONST_INT. */
@@ -155,8 +155,7 @@ typedef struct mem_attrs GTY(())
object in the low part of a 4-byte register, the OFFSET field
will be -3 rather than 0. */
-typedef struct reg_attrs GTY(())
-{
+typedef struct GTY(()) reg_attrs {
tree decl; /* decl corresponding to REG. */
HOST_WIDE_INT offset; /* Offset from start of DECL. */
} reg_attrs;
@@ -185,7 +184,7 @@ typedef union rtunion_def rtunion;
/* This structure remembers the position of a SYMBOL_REF within an
object_block structure. A SYMBOL_REF only provides this information
if SYMBOL_REF_HAS_BLOCK_INFO_P is true. */
-struct block_symbol GTY(()) {
+struct GTY(()) block_symbol {
/* The usual SYMBOL_REF fields. */
rtunion GTY ((skip)) fld[3];
@@ -203,8 +202,7 @@ DEF_VEC_ALLOC_P(rtx,gc);
/* Describes a group of objects that are to be placed together in such
a way that their relative positions are known. */
-struct object_block GTY(())
-{
+struct GTY(()) object_block {
/* The section in which these objects should be placed. */
section *sect;
@@ -237,9 +235,8 @@ struct object_block GTY(())
/* RTL expression ("rtx"). */
-struct rtx_def GTY((chain_next ("RTX_NEXT (&%h)"),
- chain_prev ("RTX_PREV (&%h)")))
-{
+struct GTY((chain_next ("RTX_NEXT (&%h)"),
+ chain_prev ("RTX_PREV (&%h)"))) rtx_def {
/* The kind of expression this is. */
ENUM_BITFIELD(rtx_code) code: 16;
@@ -357,7 +354,7 @@ struct rtx_def GTY((chain_next ("RTX_NEXT (&%h)"),
for a variable number of things. The principle use is inside
PARALLEL expressions. */
-struct rtvec_def GTY(()) {
+struct GTY(()) rtvec_def {
int num_elem; /* number of elements */
rtx GTY ((length ("%h.num_elem"))) elem[1];
};
diff --git a/gcc/stringpool.c b/gcc/stringpool.c
index d8d66f2418f..072af72de8f 100644
--- a/gcc/stringpool.c
+++ b/gcc/stringpool.c
@@ -214,8 +214,7 @@ gt_pch_n_S (const void *x)
/* SPD is saved in the PCH file and holds the information needed
to restore the string pool. */
-struct string_pool_data GTY(())
-{
+struct GTY(()) string_pool_data {
struct ht_identifier * *
GTY((length ("%h.nslots"),
nested_ptr (union tree_node, "%h ? GCC_IDENT_TO_HT_IDENT (%h) : NULL",
diff --git a/gcc/tree-data-ref.c b/gcc/tree-data-ref.c
index 305d5e45b30..0a1850f85bb 100644
--- a/gcc/tree-data-ref.c
+++ b/gcc/tree-data-ref.c
@@ -4587,7 +4587,7 @@ dot_rdg (struct graph *rdg)
/* This structure is used for recording the mapping statement index in
the RDG. */
-struct rdg_vertex_info GTY(())
+struct GTY(()) rdg_vertex_info
{
gimple stmt;
int index;
diff --git a/gcc/tree-flow.h b/gcc/tree-flow.h
index d78baf45923..b59774f29ce 100644
--- a/gcc/tree-flow.h
+++ b/gcc/tree-flow.h
@@ -45,8 +45,7 @@ struct static_var_ann_d;
/* Gimple dataflow datastructure. All publicly available fields shall have
gimple_ accessor defined in tree-flow-inline.h, all publicly modifiable
fields should have gimple_set accessor. */
-struct gimple_df GTY(())
-{
+struct GTY(()) gimple_df {
/* Array of all variables referenced in the function. */
htab_t GTY((param_is (union tree_node))) referenced_vars;
@@ -124,7 +123,7 @@ typedef struct
---------------------------------------------------------------------------*/
/* Aliasing information for SSA_NAMEs representing pointer variables. */
-struct ptr_info_def GTY(())
+struct GTY(()) ptr_info_def
{
/* The points-to solution, TBAA-pruned if the pointer is dereferenced. */
struct pt_solution pt;
@@ -136,8 +135,7 @@ struct ptr_info_def GTY(())
---------------------------------------------------------------------------*/
enum tree_ann_type { TREE_ANN_COMMON, VAR_ANN, FUNCTION_ANN };
-struct tree_ann_common_d GTY(())
-{
+struct GTY(()) tree_ann_common_d {
/* Annotation type. */
enum tree_ann_type type;
@@ -205,8 +203,7 @@ enum noalias_state {
};
-struct var_ann_d GTY(())
-{
+struct GTY(()) var_ann_d {
struct tree_ann_common_d common;
/* Used by the out of SSA pass to determine whether this variable has
@@ -248,14 +245,12 @@ struct var_ann_d GTY(())
/* Container for variable annotation used by hashtable for annotations for
static variables. */
-struct static_var_ann_d GTY(())
-{
+struct GTY(()) static_var_ann_d {
struct var_ann_d ann;
unsigned int uid;
};
-struct function_ann_d GTY(())
-{
+struct GTY(()) function_ann_d {
struct tree_ann_common_d common;
};
@@ -354,8 +349,7 @@ typedef struct immediate_use_iterator_d
-union tree_ann_d GTY((desc ("ann_type ((tree_ann_t)&%h)")))
-{
+union GTY((desc ("ann_type ((tree_ann_t)&%h)"))) tree_ann_d {
struct tree_ann_common_d GTY((tag ("TREE_ANN_COMMON"))) common;
struct var_ann_d GTY((tag ("VAR_ANN"))) vdecl;
struct function_ann_d GTY((tag ("FUNCTION_ANN"))) fdecl;
@@ -379,8 +373,7 @@ static inline int get_lineno (const_gimple);
/*---------------------------------------------------------------------------
Structure representing predictions in tree level.
---------------------------------------------------------------------------*/
-struct edge_prediction GTY((chain_next ("%h.ep_next")))
-{
+struct GTY((chain_next ("%h.ep_next"))) edge_prediction {
struct edge_prediction *ep_next;
edge ep_edge;
enum br_predictor ep_predictor;
@@ -394,8 +387,7 @@ static inline void set_phi_nodes (basic_block, gimple_seq);
/*---------------------------------------------------------------------------
Global declarations
---------------------------------------------------------------------------*/
-struct int_tree_map GTY(())
-{
+struct GTY(()) int_tree_map {
unsigned int uid;
tree to;
@@ -645,8 +637,7 @@ extern bool gimple_stmt_may_fallthru (gimple);
/* In tree-ssa.c */
/* Mapping for redirected edges. */
-struct _edge_var_map GTY(())
-{
+struct GTY(()) _edge_var_map {
tree result; /* PHI result. */
tree def; /* PHI arg definition. */
};
diff --git a/gcc/tree-scalar-evolution.c b/gcc/tree-scalar-evolution.c
index af959b75a3d..2d31f9f534c 100644
--- a/gcc/tree-scalar-evolution.c
+++ b/gcc/tree-scalar-evolution.c
@@ -282,8 +282,7 @@ static tree analyze_scalar_evolution_1 (struct loop *, tree, tree);
basic block INSTANTIATED_BELOW, the value of VAR can be expressed
as CHREC. */
-struct scev_info_str GTY(())
-{
+struct GTY(()) scev_info_str {
basic_block instantiated_below;
tree var;
tree chrec;
diff --git a/gcc/tree-ssa-address.c b/gcc/tree-ssa-address.c
index f9cd5300ff2..7a2ba399172 100644
--- a/gcc/tree-ssa-address.c
+++ b/gcc/tree-ssa-address.c
@@ -70,8 +70,7 @@ along with GCC; see the file COPYING3. If not see
/* A "template" for memory address, used to determine whether the address is
valid for mode. */
-struct mem_addr_template GTY (())
-{
+struct GTY (()) mem_addr_template {
rtx ref; /* The template. */
rtx * GTY ((skip)) step_p; /* The point in template where the step should be
filled in. */
diff --git a/gcc/tree-ssa-alias.h b/gcc/tree-ssa-alias.h
index dfaa213d794..5f951ae1625 100644
--- a/gcc/tree-ssa-alias.h
+++ b/gcc/tree-ssa-alias.h
@@ -48,7 +48,7 @@ enum escape_type
The points-to solution is a union of pt_vars and the abstract
sets specified by the flags. */
-struct pt_solution GTY(())
+struct GTY(()) pt_solution
{
/* Nonzero if points-to analysis couldn't determine where this pointer
is pointing to. */
diff --git a/gcc/tree-ssa-operands.h b/gcc/tree-ssa-operands.h
index a8d364d4701..691db93bc4c 100644
--- a/gcc/tree-ssa-operands.h
+++ b/gcc/tree-ssa-operands.h
@@ -53,14 +53,13 @@ typedef struct use_optype_d *use_optype_p;
operand memory manager. Operands are suballocated out of this block. The
MEM array varies in size. */
-struct ssa_operand_memory_d GTY((chain_next("%h.next")))
-{
+struct GTY((chain_next("%h.next"))) ssa_operand_memory_d {
struct ssa_operand_memory_d *next;
char mem[1];
};
/* Per-function operand caches. */
-struct ssa_operands GTY(()) {
+struct GTY(()) ssa_operands {
struct ssa_operand_memory_d *operand_memory;
unsigned operand_memory_index;
/* Current size of the operand memory buffer. */
diff --git a/gcc/tree.c b/gcc/tree.c
index ca81a510bf7..bcb8a0c1130 100644
--- a/gcc/tree.c
+++ b/gcc/tree.c
@@ -148,8 +148,7 @@ static GTY(()) int next_type_uid = 1;
/* Since we cannot rehash a type after it is in the table, we have to
keep the hash code. */
-struct type_hash GTY(())
-{
+struct GTY(()) type_hash {
unsigned long hash;
tree type;
};
diff --git a/gcc/tree.h b/gcc/tree.h
index 5e2ee38e4ef..ef1b42031a3 100644
--- a/gcc/tree.h
+++ b/gcc/tree.h
@@ -342,8 +342,7 @@ enum omp_clause_code
fields. */
union tree_ann_d;
-struct tree_base GTY(())
-{
+struct GTY(()) tree_base {
ENUM_BITFIELD(tree_code) code : 16;
unsigned side_effects_flag : 1;
@@ -379,8 +378,7 @@ struct tree_base GTY(())
union tree_ann_d *ann;
};
-struct tree_common GTY(())
-{
+struct GTY(()) tree_common {
struct tree_base base;
tree chain;
tree type;
@@ -1364,8 +1362,7 @@ extern void omp_clause_range_check_failed (const_tree, const char *, int,
== (unsigned HOST_WIDE_INT) TREE_INT_CST_HIGH (B)) \
&& TREE_INT_CST_LOW (A) < TREE_INT_CST_LOW (B)))
-struct tree_int_cst GTY(())
-{
+struct GTY(()) tree_int_cst {
struct tree_common common;
double_int int_cst;
};
@@ -1378,8 +1375,7 @@ struct real_value;
#define TREE_REAL_CST_PTR(NODE) (REAL_CST_CHECK (NODE)->real_cst.real_cst_ptr)
#define TREE_REAL_CST(NODE) (*TREE_REAL_CST_PTR (NODE))
-struct tree_real_cst GTY(())
-{
+struct GTY(()) tree_real_cst {
struct tree_common common;
struct real_value * real_cst_ptr;
};
@@ -1390,8 +1386,7 @@ struct fixed_value;
#define TREE_FIXED_CST_PTR(NODE) (FIXED_CST_CHECK (NODE)->fixed_cst.fixed_cst_ptr)
#define TREE_FIXED_CST(NODE) (*TREE_FIXED_CST_PTR (NODE))
-struct tree_fixed_cst GTY(())
-{
+struct GTY(()) tree_fixed_cst {
struct tree_common common;
struct fixed_value * fixed_cst_ptr;
};
@@ -1401,8 +1396,7 @@ struct tree_fixed_cst GTY(())
#define TREE_STRING_POINTER(NODE) \
((const char *)(STRING_CST_CHECK (NODE)->string.str))
-struct tree_string GTY(())
-{
+struct GTY(()) tree_string {
struct tree_common common;
int length;
char str[1];
@@ -1412,8 +1406,7 @@ struct tree_string GTY(())
#define TREE_REALPART(NODE) (COMPLEX_CST_CHECK (NODE)->complex.real)
#define TREE_IMAGPART(NODE) (COMPLEX_CST_CHECK (NODE)->complex.imag)
-struct tree_complex GTY(())
-{
+struct GTY(()) tree_complex {
struct tree_common common;
tree real;
tree imag;
@@ -1422,8 +1415,7 @@ struct tree_complex GTY(())
/* In a VECTOR_CST node. */
#define TREE_VECTOR_CST_ELTS(NODE) (VECTOR_CST_CHECK (NODE)->vector.elements)
-struct tree_vector GTY(())
-{
+struct GTY(()) tree_vector {
struct tree_common common;
tree elements;
};
@@ -1446,8 +1438,7 @@ struct tree_vector GTY(())
((tree) ((char *) (NODE) - sizeof (struct tree_common)))
#define GCC_IDENT_TO_HT_IDENT(NODE) (&((struct tree_identifier *) (NODE))->id)
-struct tree_identifier GTY(())
-{
+struct GTY(()) tree_identifier {
struct tree_common common;
struct ht_identifier id;
};
@@ -1456,8 +1447,7 @@ struct tree_identifier GTY(())
#define TREE_PURPOSE(NODE) (TREE_LIST_CHECK (NODE)->list.purpose)
#define TREE_VALUE(NODE) (TREE_LIST_CHECK (NODE)->list.value)
-struct tree_list GTY(())
-{
+struct GTY(()) tree_list {
struct tree_common common;
tree purpose;
tree value;
@@ -1470,8 +1460,7 @@ struct tree_list GTY(())
#define TREE_VEC_ELT(NODE,I) TREE_VEC_ELT_CHECK (NODE, I)
-struct tree_vec GTY(())
-{
+struct GTY(()) tree_vec {
struct tree_common common;
int length;
tree GTY ((length ("TREE_VEC_LENGTH ((tree)&%h)"))) a[1];
@@ -1516,8 +1505,7 @@ struct tree_vec GTY(())
element. INDEX can optionally design the position of VALUE: in arrays,
it is the index where VALUE has to be placed; in structures, it is the
FIELD_DECL of the member. */
-typedef struct constructor_elt_d GTY(())
-{
+typedef struct GTY(()) constructor_elt_d {
tree index;
tree value;
} constructor_elt;
@@ -1525,8 +1513,7 @@ typedef struct constructor_elt_d GTY(())
DEF_VEC_O(constructor_elt);
DEF_VEC_ALLOC_O(constructor_elt,gc);
-struct tree_constructor GTY(())
-{
+struct GTY(()) tree_constructor {
struct tree_common common;
VEC(constructor_elt,gc) *elts;
};
@@ -1820,8 +1807,7 @@ enum omp_clause_default_kind
#define OMP_CLAUSE_DEFAULT_KIND(NODE) \
(OMP_CLAUSE_SUBCODE_CHECK (NODE, OMP_CLAUSE_DEFAULT)->omp_clause.subcode.default_kind)
-struct tree_exp GTY(())
-{
+struct GTY(()) tree_exp {
struct tree_common common;
location_t locus;
tree block;
@@ -1879,8 +1865,7 @@ struct ptr_info_def;
/* Immediate use linking structure. This structure is used for maintaining
a doubly linked list of uses of an SSA_NAME. */
-typedef struct ssa_use_operand_d GTY(())
-{
+typedef struct GTY(()) ssa_use_operand_d {
struct ssa_use_operand_d* GTY((skip(""))) prev;
struct ssa_use_operand_d* GTY((skip(""))) next;
/* Immediate uses for a given SSA name are maintained as a cyclic
@@ -1895,8 +1880,7 @@ typedef struct ssa_use_operand_d GTY(())
/* Return the immediate_use information for an SSA_NAME. */
#define SSA_NAME_IMM_USE_NODE(NODE) SSA_NAME_CHECK (NODE)->ssa_name.imm_uses
-struct tree_ssa_name GTY(())
-{
+struct GTY(()) tree_ssa_name {
struct tree_common common;
/* _DECL wrapped by this SSA name. */
@@ -1922,8 +1906,7 @@ struct tree_ssa_name GTY(())
struct ssa_use_operand_d imm_uses;
};
-struct phi_arg_d GTY(())
-{
+struct GTY(()) phi_arg_d {
/* imm_use MUST be the first element in struct because we do some
pointer arithmetic with it. See phi_arg_index_from_use. */
struct ssa_use_operand_d imm_use;
@@ -1943,8 +1926,7 @@ struct phi_arg_d GTY(())
#define OMP_CLAUSE_OPERAND(NODE, I) \
OMP_CLAUSE_ELT_CHECK (NODE, I)
-struct tree_omp_clause GTY(())
-{
+struct GTY(()) tree_omp_clause {
struct tree_common common;
enum omp_clause_code code;
union omp_clause_subcode {
@@ -2013,8 +1995,7 @@ struct varray_head_tag;
#define BLOCK_SOURCE_LOCATION(NODE) (BLOCK_CHECK (NODE)->block.locus)
-struct tree_block GTY(())
-{
+struct GTY(()) tree_block {
struct tree_common common;
unsigned abstract_flag : 1;
@@ -2259,8 +2240,7 @@ extern enum machine_mode vector_type_mode (const_tree);
struct die_struct;
-struct tree_type GTY(())
-{
+struct GTY(()) tree_type {
struct tree_common common;
tree values;
tree size;
@@ -2413,8 +2393,7 @@ struct tree_type GTY(())
#define BINFO_INHERITANCE_CHAIN(NODE) \
(TREE_BINFO_CHECK(NODE)->binfo.inheritance)
-struct tree_binfo GTY (())
-{
+struct GTY (()) tree_binfo {
struct tree_common common;
tree offset;
@@ -2487,8 +2466,7 @@ struct function;
scope". */
#define DECL_CONTEXT(NODE) (DECL_MINIMAL_CHECK (NODE)->decl_minimal.context)
#define DECL_FIELD_CONTEXT(NODE) (FIELD_DECL_CHECK (NODE)->decl_minimal.context)
-struct tree_decl_minimal GTY(())
-{
+struct GTY(()) tree_decl_minimal {
struct tree_common common;
location_t locus;
unsigned int uid;
@@ -2642,8 +2620,7 @@ struct tree_decl_minimal GTY(())
#define DECL_NO_TBAA_P(DECL) \
DECL_COMMON_CHECK (DECL)->decl_common.no_tbaa_flag
-struct tree_decl_common GTY(())
-{
+struct GTY(()) tree_decl_common {
struct tree_decl_minimal common;
tree size;
@@ -2745,8 +2722,7 @@ extern void decl_value_expr_insert (tree, tree);
/* In VAR_DECL and PARM_DECL nodes, nonzero means declared `register'. */
#define DECL_REGISTER(NODE) (DECL_WRTL_CHECK (NODE)->decl_common.decl_flag_0)
-struct tree_decl_with_rtl GTY(())
-{
+struct GTY(()) tree_decl_with_rtl {
struct tree_decl_common common;
rtx rtl;
};
@@ -2814,8 +2790,7 @@ struct tree_decl_with_rtl GTY(())
#define DECL_NONADDRESSABLE_P(NODE) \
(FIELD_DECL_CHECK (NODE)->decl_common.decl_flag_3)
-struct tree_field_decl GTY(())
-{
+struct GTY(()) tree_field_decl {
struct tree_decl_common common;
tree offset;
@@ -2836,18 +2811,15 @@ struct tree_field_decl GTY(())
jumping into such a binding contour has been printed for this label. */
#define DECL_ERROR_ISSUED(NODE) (LABEL_DECL_CHECK (NODE)->decl_common.decl_flag_0)
-struct tree_label_decl GTY(())
-{
+struct GTY(()) tree_label_decl {
struct tree_decl_with_rtl common;
};
-struct tree_result_decl GTY(())
-{
+struct GTY(()) tree_result_decl {
struct tree_decl_with_rtl common;
};
-struct tree_const_decl GTY(())
-{
+struct GTY(()) tree_const_decl {
struct tree_decl_with_rtl common;
};
@@ -2859,8 +2831,7 @@ struct tree_const_decl GTY(())
where the data was actually passed. */
#define DECL_INCOMING_RTL(NODE) (PARM_DECL_CHECK (NODE)->parm_decl.incoming_rtl)
-struct tree_parm_decl GTY(())
-{
+struct GTY(()) tree_parm_decl {
struct tree_decl_with_rtl common;
rtx incoming_rtl;
};
@@ -2982,8 +2953,7 @@ extern void decl_restrict_base_insert (tree, tree);
multiple translation units should be merged. */
#define DECL_ONE_ONLY(NODE) (DECL_WITH_VIS_CHECK (NODE)->decl_with_vis.one_only)
-struct tree_decl_with_vis GTY(())
-{
+struct GTY(()) tree_decl_with_vis {
struct tree_decl_with_rtl common;
tree assembler_name;
tree section_name;
@@ -3087,8 +3057,7 @@ extern void decl_fini_priority_insert (tree, priority_type);
#define DECL_THREAD_LOCAL_P(NODE) \
(VAR_DECL_CHECK (NODE)->decl_with_vis.tls_model >= TLS_MODEL_REAL)
-struct tree_var_decl GTY(())
-{
+struct GTY(()) tree_var_decl {
struct tree_decl_with_vis common;
};
@@ -3107,9 +3076,8 @@ struct tree_var_decl GTY(())
C++ also uses this field in namespaces, hence the DECL_NON_COMMON_CHECK. */
#define DECL_VINDEX(NODE) (DECL_NON_COMMON_CHECK (NODE)->decl_non_common.vindex)
-struct tree_decl_non_common GTY(())
-
-{
+struct GTY(())
+ tree_decl_non_common {
struct tree_decl_with_vis common;
/* C++ uses this in namespaces. */
tree saved_tree;
@@ -3244,8 +3212,7 @@ struct tree_decl_non_common GTY(())
FUNCTION_DECL from non_common, or inherit non_common from FUNCTION_DECL,
which seemed a bit strange. */
-struct tree_function_decl GTY(())
-{
+struct GTY(()) tree_function_decl {
struct tree_decl_non_common common;
struct function *f;
@@ -3298,8 +3265,7 @@ struct tree_function_decl GTY(())
#define IMPORTED_DECL_ASSOCIATED_DECL(NODE) \
(DECL_INITIAL (IMPORTED_DECL_CHECK (NODE)))
-struct tree_type_decl GTY(())
-{
+struct GTY(()) tree_type_decl {
struct tree_decl_non_common common;
};
@@ -3315,17 +3281,15 @@ struct tree_type_decl GTY(())
#define STATEMENT_LIST_TAIL(NODE) \
(STATEMENT_LIST_CHECK (NODE)->stmt_list.tail)
-struct tree_statement_list_node
- GTY ((chain_next ("%h.next"), chain_prev ("%h.prev")))
-{
+struct GTY ((chain_next ("%h.next"), chain_prev ("%h.prev"))) tree_statement_list_node
+ {
struct tree_statement_list_node *prev;
struct tree_statement_list_node *next;
tree stmt;
};
-struct tree_statement_list
- GTY(())
-{
+struct GTY(()) tree_statement_list
+ {
struct tree_common common;
struct tree_statement_list_node *head;
struct tree_statement_list_node *tail;
@@ -3334,8 +3298,7 @@ struct tree_statement_list
/* Optimization options used by a function. */
-struct tree_optimization_option GTY(())
-{
+struct GTY(()) tree_optimization_option {
struct tree_common common;
/* The optimization options used by the user. */
@@ -3350,8 +3313,7 @@ extern tree build_optimization_node (void);
/* Target options used by a function. */
-struct tree_target_option GTY(())
-{
+struct GTY(()) tree_target_option {
struct tree_common common;
/* The optimization options used by the user. */
@@ -3369,9 +3331,8 @@ extern tree build_target_option_node (void);
It may be any of the structures declared above
for various types of node. */
-union tree_node GTY ((ptr_alias (union lang_tree_node),
- desc ("tree_node_structure (&%h)")))
-{
+union GTY ((ptr_alias (union lang_tree_node),
+ desc ("tree_node_structure (&%h)"))) tree_node {
struct tree_base GTY ((tag ("TS_BASE"))) base;
struct tree_common GTY ((tag ("TS_COMMON"))) common;
struct tree_int_cst GTY ((tag ("TS_INT_CST"))) int_cst;
@@ -5166,8 +5127,7 @@ extern void vect_set_verbosity_level (const char *);
/* In tree.c. */
-struct tree_map_base GTY(())
-{
+struct GTY(()) tree_map_base {
tree from;
};
@@ -5177,8 +5137,7 @@ extern int tree_map_base_marked_p (const void *);
/* Map from a tree to another tree. */
-struct tree_map GTY(())
-{
+struct GTY(()) tree_map {
struct tree_map_base base;
unsigned int hash;
tree to;
@@ -5190,8 +5149,7 @@ extern unsigned int tree_map_hash (const void *);
/* Map from a tree to an int. */
-struct tree_int_map GTY(())
-{
+struct GTY(()) tree_int_map {
struct tree_map_base base;
unsigned int to;
};
@@ -5202,8 +5160,7 @@ struct tree_int_map GTY(())
/* Map from a tree to initialization/finalization priorities. */
-struct tree_priority_map GTY(())
-{
+struct GTY(()) tree_priority_map {
struct tree_map_base base;
priority_type init;
priority_type fini;
@@ -5249,15 +5206,13 @@ tree_operand_length (const_tree node)
defined by this point. */
/* Structure containing iterator state. */
-typedef struct call_expr_arg_iterator_d GTY (())
-{
+typedef struct GTY (()) call_expr_arg_iterator_d {
tree t; /* the call_expr */
int n; /* argument count */
int i; /* next argument index */
} call_expr_arg_iterator;
-typedef struct const_call_expr_arg_iterator_d GTY (())
-{
+typedef struct GTY (()) const_call_expr_arg_iterator_d {
const_tree t; /* the call_expr */
int n; /* argument count */
int i; /* next argument index */
diff --git a/gcc/varasm.c b/gcc/varasm.c
index 9a611e0164f..9dcae52e344 100644
--- a/gcc/varasm.c
+++ b/gcc/varasm.c
@@ -2713,8 +2713,7 @@ assemble_real (REAL_VALUE_TYPE d, enum machine_mode mode, unsigned int align)
Store them both in the structure *VALUE.
EXP must be reducible. */
-struct addr_const GTY(())
-{
+struct GTY(()) addr_const {
rtx base;
HOST_WIDE_INT offset;
};
@@ -2782,8 +2781,7 @@ decode_addr_const (tree exp, struct addr_const *value)
Each constant in memory thus far output is recorded
in `const_desc_table'. */
-struct constant_descriptor_tree GTY(())
-{
+struct GTY(()) constant_descriptor_tree {
/* A MEM for the constant. */
rtx rtl;
@@ -3368,8 +3366,7 @@ lookup_constant_def (tree exp)
can use one per-file pool. Should add a targetm bit to tell the
difference. */
-struct rtx_constant_pool GTY(())
-{
+struct GTY(()) rtx_constant_pool {
/* Pointers to first and last constant in pool, as ordered by offset. */
struct constant_descriptor_rtx *first;
struct constant_descriptor_rtx *last;
@@ -3385,8 +3382,7 @@ struct rtx_constant_pool GTY(())
HOST_WIDE_INT offset;
};
-struct constant_descriptor_rtx GTY((chain_next ("%h.next")))
-{
+struct GTY((chain_next ("%h.next"))) constant_descriptor_rtx {
struct constant_descriptor_rtx *next;
rtx mem;
rtx sym;
@@ -5180,8 +5176,7 @@ globalize_decl (tree decl)
of an alias. This requires that the decl have been defined. Aliases
that precede their definition have to be queued for later processing. */
-typedef struct alias_pair GTY(())
-{
+typedef struct GTY(()) alias_pair {
tree decl;
tree target;
} alias_pair;
diff --git a/gcc/varray.h b/gcc/varray.h
index 00814473bf0..fbccde34d26 100644
--- a/gcc/varray.h
+++ b/gcc/varray.h
@@ -62,7 +62,7 @@ enum varray_data_enum {
};
/* Union of various array types that are used. */
-typedef union varray_data_tag GTY (()) {
+typedef union GTY (()) varray_data_tag {
char GTY ((length ("%0.num_elements"),
tag ("VARRAY_DATA_C"))) vdt_c[1];
unsigned char GTY ((length ("%0.num_elements"),
@@ -110,7 +110,7 @@ typedef union varray_data_tag GTY (()) {
} varray_data;
/* Virtual array of pointers header. */
-struct varray_head_tag GTY(()) {
+struct GTY(()) varray_head_tag {
size_t num_elements; /* Maximum element number allocated. */
size_t elements_used; /* The number of elements used, if
using VARRAY_PUSH/VARRAY_POP. */
diff --git a/gcc/vec.h b/gcc/vec.h
index adbd16aacbb..e242baaa1d1 100644
--- a/gcc/vec.h
+++ b/gcc/vec.h
@@ -471,7 +471,7 @@ typedef struct VEC(T,B) \
} VEC(T,B)
#define VEC_T_GTY(T,B) \
-typedef struct VEC(T,B) GTY(()) \
+typedef struct GTY(()) VEC(T,B) \
{ \
unsigned num; \
unsigned alloc; \
@@ -480,7 +480,7 @@ typedef struct VEC(T,B) GTY(()) \
/* Derived vector type, user visible. */
#define VEC_TA_GTY(T,B,A,GTY) \
-typedef struct VEC(T,A) GTY \
+typedef struct GTY VEC(T,A) \
{ \
VEC(T,B) base; \
} VEC(T,A)
diff --git a/include/hashtab.h b/include/hashtab.h
index 77eee14e94f..4f67448a9af 100644
--- a/include/hashtab.h
+++ b/include/hashtab.h
@@ -96,8 +96,7 @@ typedef void (*htab_free_with_arg) (void *, void *);
functions mentioned below. The size of this structure is subject to
change. */
-struct htab GTY(())
-{
+struct GTY(()) htab {
/* Pointer to hash function. */
htab_hash hash_f;
diff --git a/include/splay-tree.h b/include/splay-tree.h
index b03c581e0b2..8f236e09ccf 100644
--- a/include/splay-tree.h
+++ b/include/splay-tree.h
@@ -86,8 +86,7 @@ typedef void *(*splay_tree_allocate_fn) (int, void *);
typedef void (*splay_tree_deallocate_fn) (void *, void *);
/* The nodes in the splay tree. */
-struct splay_tree_node_s GTY(())
-{
+struct GTY(()) splay_tree_node_s {
/* The key. */
splay_tree_key GTY ((use_param1)) key;
@@ -100,8 +99,7 @@ struct splay_tree_node_s GTY(())
};
/* The splay tree itself. */
-struct splay_tree_s GTY(())
-{
+struct GTY(()) splay_tree_s {
/* The root of the tree. */
splay_tree_node GTY ((use_params)) root;
diff --git a/libcpp/ChangeLog b/libcpp/ChangeLog
index ff720612a56..a9ccc59717b 100644
--- a/libcpp/ChangeLog
+++ b/libcpp/ChangeLog
@@ -1,3 +1,10 @@
+2009-04-21 Taras Glek <tglek@mozilla.com>
+
+ * include/cpp-id-data.h: Update GTY annotations to new syntax.
+ * include/cpplib.h: Likewise.
+ * include/line-map.h: Likewise.
+ * include/symtab.h: Likewise.
+
2009-04-22 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
PR c++/14875
diff --git a/libcpp/include/cpp-id-data.h b/libcpp/include/cpp-id-data.h
index 029d424d511..a57edad521d 100644
--- a/libcpp/include/cpp-id-data.h
+++ b/libcpp/include/cpp-id-data.h
@@ -25,8 +25,7 @@ typedef unsigned char uchar;
#define UC (const unsigned char *) /* Intended use: UC"string" */
/* Chained list of answers to an assertion. */
-struct answer GTY(())
-{
+struct GTY(()) answer {
struct answer *next;
unsigned int count;
cpp_token GTY ((length ("%h.count"))) first[1];
@@ -34,8 +33,7 @@ struct answer GTY(())
/* Each macro definition is recorded in a cpp_macro structure.
Variadic macros cannot occur with traditional cpp. */
-struct cpp_macro GTY(())
-{
+struct GTY(()) cpp_macro {
/* Parameters, if any. */
cpp_hashnode ** GTY ((nested_ptr (union tree_node,
"%h ? CPP_HASHNODE (GCC_IDENT_TO_HT_IDENT (%h)) : NULL",
diff --git a/libcpp/include/cpplib.h b/libcpp/include/cpplib.h
index b38d9f43ef5..80e905686fc 100644
--- a/libcpp/include/cpplib.h
+++ b/libcpp/include/cpplib.h
@@ -162,8 +162,7 @@ enum c_lang {CLK_GNUC89 = 0, CLK_GNUC99, CLK_STDC89, CLK_STDC94, CLK_STDC99,
CLK_GNUCXX, CLK_CXX98, CLK_GNUCXX0X, CLK_CXX0X, CLK_ASM};
/* Payload of a NUMBER, STRING, CHAR or COMMENT token. */
-struct cpp_string GTY(())
-{
+struct GTY(()) cpp_string {
unsigned int len;
const unsigned char *text;
};
@@ -196,8 +195,7 @@ enum cpp_token_fld_kind {
/* A preprocessing token. This has been carefully packed and should
occupy 16 bytes on 32-bit hosts and 24 bytes on 64-bit hosts. */
-struct cpp_token GTY(())
-{
+struct GTY(()) cpp_token {
source_location src_loc; /* Location of first char of token. */
ENUM_BITFIELD(cpp_ttype) type : CHAR_BIT; /* token type */
unsigned short flags; /* flags - see above */
@@ -604,8 +602,7 @@ enum {
ends. Also used to store CPP identifiers, which are a superset of
identifiers in the grammatical sense. */
-union _cpp_hashnode_value GTY(())
-{
+union GTY(()) _cpp_hashnode_value {
/* If a macro. */
cpp_macro * GTY((tag ("NTV_MACRO"))) macro;
/* Answers to an assertion. */
@@ -616,8 +613,7 @@ union _cpp_hashnode_value GTY(())
unsigned short GTY ((tag ("NTV_ARGUMENT"))) arg_index;
};
-struct cpp_hashnode GTY(())
-{
+struct GTY(()) cpp_hashnode {
struct ht_identifier ident;
unsigned int is_directive : 1;
unsigned int directive_index : 7; /* If is_directive,
diff --git a/libcpp/include/line-map.h b/libcpp/include/line-map.h
index 56ab79a2608..b556013af62 100644
--- a/libcpp/include/line-map.h
+++ b/libcpp/include/line-map.h
@@ -58,8 +58,7 @@ typedef void *(*line_map_realloc) (void *, size_t);
creation of this line map, SYSP is one for a system header, two for
a C system header file that therefore needs to be extern "C"
protected in C++, and zero otherwise. */
-struct line_map GTY(())
-{
+struct GTY(()) line_map {
const char *to_file;
linenum_type to_line;
source_location start_location;
@@ -72,8 +71,7 @@ struct line_map GTY(())
};
/* A set of chronological line_map structures. */
-struct line_maps GTY(())
-{
+struct GTY(()) line_maps {
struct line_map * GTY ((length ("%h.used"))) maps;
unsigned int allocated;
unsigned int used;
diff --git a/libcpp/include/symtab.h b/libcpp/include/symtab.h
index 225301e10ff..e7c593731bc 100644
--- a/libcpp/include/symtab.h
+++ b/libcpp/include/symtab.h
@@ -27,8 +27,7 @@ along with this program; see the file COPYING3. If not see
/* This is what each hash table entry points to. It may be embedded
deeply within another object. */
typedef struct ht_identifier ht_identifier;
-struct ht_identifier GTY(())
-{
+struct GTY(()) ht_identifier {
const unsigned char *str;
unsigned int len;
unsigned int hash_value;