From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 10864 invoked by alias); 22 Apr 2003 14:16:01 -0000 Mailing-List: contact gcc-prs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-prs-owner@gcc.gnu.org Received: (qmail 10843 invoked by uid 71); 22 Apr 2003 14:16:01 -0000 Resent-Date: 22 Apr 2003 14:16:01 -0000 Resent-Message-ID: <20030422141601.10842.qmail@sources.redhat.com> Resent-From: gcc-gnats@gcc.gnu.org (GNATS Filer) Resent-Cc: gcc-prs@gcc.gnu.org, gcc-bugs@gcc.gnu.org Resent-Reply-To: gcc-gnats@gcc.gnu.org, ak03@gte.com Received: (qmail 8459 invoked from network); 22 Apr 2003 14:13:04 -0000 Received: from unknown (HELO h132-197-179-51.gte.com) (132.197.179.51) by sources.redhat.com with SMTP; 22 Apr 2003 14:13:04 -0000 Received: from ork.gte.com (9h3vf7jbjvpi1tld@localhost [127.0.0.1]) by h132-197-179-51.gte.com (8.12.8/8.12.8) with ESMTP id h3MECrCb055863; Tue, 22 Apr 2003 10:12:53 -0400 (EDT) (envelope-from ak03@ork.gte.com) Received: (from ak03@localhost) by ork.gte.com (8.12.8/8.12.8/Submit) id h3MECqoo055862; Tue, 22 Apr 2003 10:12:52 -0400 (EDT) Message-Id: <200304221412.h3MECqoo055862@ork.gte.com> Date: Tue, 22 Apr 2003 14:16:00 -0000 From: ak03@gte.com To: gcc-gnats@gcc.gnu.org Cc: feifer@dbai.tuwien.ac.at, rittle@latour.rsch.comm.mot.com, obrien@FreeBSD.ORG X-Send-Pr-Version: 3.113 Subject: bootstrap/10452: Make gengtype-yacc.y buildable with FreeBSD yacc X-SW-Source: 2003-04/txt/msg00922.txt.bz2 List-Id: >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 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 PARAM_IS %token NUM %token PERCENTPERCENT "%%" --- 40,50 ---- %token ENT_STRUCT %token ENT_EXTERNSTATIC %token ENT_YACCUNION ! %token GTY_TOKEN ! %token UNION ! %token STRUCT ! %token ENUM ! %token ALIAS %token PARAM_IS %token NUM %token PERCENTPERCENT "%%" >Release-Note: >Audit-Trail: >Unformatted: