[patch 3/8] Improve kludges for VEC handling

Ian Lance Taylor iant@google.com
Wed Mar 21 00:44:00 GMT 2007


Zack Weinberg <zackw@panix.com> writes:

>         * vec.h: Remove all #if IN_GENGTYPE blocks.
> 	Add comment saying that changes may require adjustments to gengtype.
>         * gengtype.c: Don't include coretypes.h or tm.h.
> 	Add comment to inclusion of errors.h.
> 	(note_def_vec, note_def_vec_alloc): New functions.
> 	* gengtype.h: Declare new functions.
> 	* gengtype-lex.l: Don't include coretypes.h.
> 	(YY_INPUT, macro_input, push_macro_expansion, mangle_macro_name):
> 	Delete.
> 	(update_lineno): Remove unnecessary prototype.
> 	(DEF_VEC_* rules): Simplify using note_def_vec / note_def_vec_alloc.
> 	(VEC rule): Just return VEC_TOKEN.
> 	* gengtype-yacc.y (VEC_TOKEN): New token type.
> 	(type): Add a production for VEC(a,b).
> 	* Makefile.in: Update dependencies.


> +  while (!ISALNUM(*p) && *p != '_') p++;
> +  q = p;
> +  while (ISALNUM(*q) || *q == '_') q++;

Please use GNU style: put the p++/q++ on the next line.

> +  while (!ISALNUM(*p) && *p != '_') p++;
> +  q = p;
> +  while (ISALNUM(*q) || *q == '_') q++;

Here too.

> +  while (!ISALNUM(*p) && *p != '_') p++;
> +  q = p;
> +  while (ISALNUM(*q) || *q == '_') q++;

And here.

This is OK with those changes.

Thanks.

Ian



More information about the Gcc-patches mailing list