From 01d419aec11b9ffbdfae60e78795faea19086e10 Mon Sep 17 00:00:00 2001 From: Zack Weinberg Date: Mon, 26 Mar 2007 21:18:43 +0000 Subject: 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 --- gcc/bitmap.h | 23 +++++++---------------- 1 file changed, 7 insertions(+), 16 deletions(-) (limited to 'gcc/bitmap.h') 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 */ -- cgit v1.2.1