summaryrefslogtreecommitdiff
path: root/gcc/bitmap.h
diff options
context:
space:
mode:
authorZack Weinberg <zackw@panix.com>2007-03-26 21:18:43 +0000
committerZack Weinberg <zack@gcc.gnu.org>2007-03-26 21:18:43 +0000
commit01d419aec11b9ffbdfae60e78795faea19086e10 (patch)
tree92672610b9effb039afa4b4273d36d385aff54d8 /gcc/bitmap.h
parent11a675992afb01354e8d8331087177c25e97a7a6 (diff)
downloadgcc-01d419aec11b9ffbdfae60e78795faea19086e10.tar.gz
gengtype-parse.c: New file.
* gengtype-parse.c: New file. * gengtype-yacc.y: Delete. * gengtype-lex.l: Don't include gengtype-yacc.h. Define YY_DECL and yyterminate appropriately for recursive descent parser. yylval is now a string out-parameter to yylex. (HWS, EOID): New shorthand. (IWORD): Add a couple more types. (yylex): Add a setup stanza. Remove the complex rules for detecting GTY'ed types and typedefs; replace with simple keyword detectors. Adjust everything for the changed definition of yylval. Ignore all pp-directives, not just #define. (yyerror): Delete. (parse_file): Rename yybegin; do not call yyparse. (yyend): New. * gengtype.c (xasprintf): Export again. (this_file): New. Use everywhere __FILE__ was being used. (get_lang_bitmap): Special case types defined in gengtype.c. (do_typedef, new_structure): Suppress definition of certain types. (new_structure): Improve diagnostics of duplicate definitions. Make sure location_s is associated with input.h. (nreverse_pairs, define_location_structures): New functions. (main): Improve tagging of kludge types. Remove old kludges for input.h types; use define_location_structures. * gengtype.h: Update prototypes. Define token codes here. * Makefile.in: Remove all references to gengtype-yacc. Add rules for gengtype-parse.o. Adjust rules for gengtype-lex.o and gengtype. * bitmap.h (struct bitmap_head_def): Coalesce definitions, add GTY((skip)) to the field that's only conditionally there. * doc/install.texi: Document that Bison is no longer required unless building treelang. From-SVN: r123235
Diffstat (limited to 'gcc/bitmap.h')
-rw-r--r--gcc/bitmap.h23
1 files changed, 7 insertions, 16 deletions
diff --git a/gcc/bitmap.h b/gcc/bitmap.h
index 515527c08e8..9a33646ccb1 100644
--- a/gcc/bitmap.h
+++ b/gcc/bitmap.h
@@ -70,29 +70,20 @@ typedef struct bitmap_element_def GTY(())
} bitmap_element;
struct bitmap_descriptor;
-/* Head of bitmap linked list.
- The gengtype doesn't cope with ifdefs inside the definition,
- but for statistics we need bitmap descriptor pointer in.
- Trick it by two copies of the definition. This is safe
- because the bitmap descriptor is not grabagecollected. */
-#ifndef GATHER_STATISTICS
+/* Head of bitmap linked list. gengtype ignores ifdefs, but for
+ 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(()) {
bitmap_element *first; /* First element in linked list. */
bitmap_element *current; /* Last element looked at. */
unsigned int indx; /* Index of last element looked at. */
bitmap_obstack *obstack; /* Obstack to allocate elements from.
If NULL, then use ggc_alloc. */
-} bitmap_head;
-#else
-typedef struct 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. */
- bitmap_obstack *obstack; /* Obstack to allocate elements from.
- If NULL, then use ggc_alloc. */
- struct bitmap_descriptor *desc;
-} bitmap_head;
+#ifndef GATHER_STATISTICS
+ struct bitmap_descriptor GTY((skip)) *desc;
#endif
+} bitmap_head;
/* Global data */
extern bitmap_element bitmap_zero_bits; /* Zero bitmap element */