bootstrap/10452: Make gengtype-yacc.y buildable with FreeBSD yacc
ak03@gte.com
ak03@gte.com
Tue Apr 22 14:16:00 GMT 2003
>Number: 10452
>Category: bootstrap
>Synopsis: Make gengtype-yacc.y compatible with stock FreeBSD yacc
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: unassigned
>State: open
>Class: change-request
>Submitter-Id: net
>Arrival-Date: Tue Apr 22 14:16:01 UTC 2003
>Closed-Date:
>Last-Modified:
>Originator: Alexander N. Kabaev
>Release: 3.3 20030421 (prerelease)
>Organization:
FreeBSD Project
>Environment:
System: FreeBSD ork.gte.com 4.8-RC FreeBSD 4.8-RC #2: Mon Mar 24 11:00:40 EST 2003 ak03@ork.gte.com:/usr/src/sys/compile/KAN i386
FreeBSD kanpc.gte.com 5.0-CURRENT FreeBSD 5.0-CURRENT #4: Wed Apr 16 18:23:28 EDT 2003 ak03@kanpc.gte.com:/usr/src/sys/i386/compile/KANPC i386
host: i386-portbld-freebsd4.8
build: i386-portbld-freebsd4.8
target: i386-portbld-freebsd4.8
configured with: ./..//gcc-20030421/configure --disable-nls --with-gnu-as --with-gnu-ld --with-gxx-include-dir=/usr/local/lib/gcc-lib/i386-portbld-freebsd4.8/3.3/include/g++-v3 --with-system-zlib --disable-shared --prefix=/usr/local i386-portbld-freebsd4.8
>Description:
gengtype-yacc.y grammar definition file contains token definition
lines which appear to be bison specific. The string values after the
token are not supported by the stock FreeBSD yacc and they are not
required for the parser to work anyway. Attached patch removes
these string identifiers to facilitate easier integration of the
upcoming GCC 3.3 release into FreeBSD source tree.
Also, add defines for malloc and realloc to change them into
xmalloc and xrealloc respectively. This takes care of yacc
programs whose genererated code contains invocations of any
of these functions.
>How-To-Repeat:
N/A
>Fix:
Index: gengtype-yacc.y
===================================================================
RCS file: /usr/ncvs2/src/contrib/gcc/gengtype-yacc.y,v
retrieving revision 1.1.1.1
diff -u -c -r1.1.1.1 gengtype-yacc.y
*** gengtype-yacc.y 3 Apr 2003 01:50:40 -0000 1.1.1.1
--- gengtype-yacc.y 22 Apr 2003 14:00:48 -0000
***************
*** 24,29 ****
--- 24,32 ----
#include "system.h"
#include "gengtype.h"
#define YYERROR_VERBOSE
+
+ #define malloc xmalloc
+ #define realloc xrealloc
%}
%union {
***************
*** 37,47 ****
%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 "%%"
--- 40,50 ----
%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 "%%"
>Release-Note:
>Audit-Trail:
>Unformatted:
More information about the Gcc-bugs
mailing list