This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

PATCH: gengtype-yacc.y portability


Attn: Geoff Keating

I've looked at bootstrap/10452 from my peers on the FreeBSD-side that
have been looking at pulling gcc 3.3 into the system compiler ASAP
after the official FSF release.  byacc is still used to build gcc on
FreeBSD in that configuration.  In the interest of robustness (testing
an implementation against multiple tool chains vs. one improves
overall robustness), could I install this patch on mainline and 3.3?

I rebuilt gengtype-yacc.c with both bison and byacc and studied the
output (diff against the original in the case of bison).  More
importantly perhaps: I verified that gentype output itself was the
same before and after this patch.  FYI, byacc is treating the second
item on the token line as another token to handle instead of the name
to use in the debugging name table.

Thanks,
Loren

2003-04-29  Alexander Kabaev  <kan at FreeBSD dot ORG>

	bootstrap/10452
	* gengtype-yacc.y: Improve portability.

Index: gcc/gengtype-yacc.y
===================================================================
RCS file: /cvs/gcc/gcc/gcc/gengtype-yacc.y,v
retrieving revision 1.8
diff -c -r1.8 gengtype-yacc.y
*** gcc/gengtype-yacc.y	16 Dec 2002 18:19:34 -0000	1.8
--- gcc/gengtype-yacc.y	29 Apr 2003 15:36:24 -0000
***************
*** 39,49 ****
  %token <t>ENT_STRUCT
  %token ENT_EXTERNSTATIC
  %token ENT_YACCUNION
! %token GTY_TOKEN "GTY"
! %token UNION "union"
! %token STRUCT "struct"
! %token ENUM "enum"
! %token ALIAS "ptr_alias"
  %token <s>PARAM_IS
  %token NUM
  %token PERCENTPERCENT "%%"
--- 39,49 ----
  %token <t>ENT_STRUCT
  %token ENT_EXTERNSTATIC
  %token ENT_YACCUNION
! %token GTY_TOKEN
! %token UNION
! %token STRUCT
! %token ENUM
! %token ALIAS
  %token <s>PARAM_IS
  %token NUM
  %token PERCENTPERCENT "%%"


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]