🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: gnu.utils.bug
Article #1553

bison bugs and fixes

#1553
From: Brian Matthews
Date: Tue, 11 Apr 1989 18:13
53 lines
1812 bytes
I ran into a couple of problems getting the latest bison from osu-cis (as
of 17 Mar) running.  I'm compiling with gcc 1.34 on a System V Release 3
machine.  Context diffs are attached below.

First, in reduce.c, fixed_outfiles is declared but unused in
reduce_grammar, and used but undeclared in print_notices.

Second, conflicts.c should use __builtin_alloca if it's available (i.e.
we're compiled with gcc).

Context diffs to fix both:

*** orig/reduce.c	Mon Apr 10 17:01:41 1989
--- reduce.c	Tue Apr 11 11:02:05 1989
***************
*** 112,118 ****
  reduce_grammar ()
  {
    bool reduced;
-   extern int fixed_outfiles;
  
    /* Allocate the global sets used to compute the reduced grammar */
  
--- 112,117 ----
***************
*** 540,545 ****
--- 539,546 ----
  static void 
  print_notices ()
  {
+   extern int fixed_outfiles;
+ 
    if (fixed_outfiles && nuseless_productions)
      fprintf(stderr, "%d rules never reduced\n", nuseless_productions);
  
*** orig/conflicts.c	Tue Apr 11 10:35:20 1989
--- conflicts.c	Tue Apr 11 10:37:05 1989
***************
*** 37,42 ****
--- 37,46 ----
  extern char *alloca ();
  #endif
  
+ #ifdef __GNUC__
+ #define alloca __builtin_alloca
+ #endif
+ 
  extern char **tags;
  extern int tokensetsize;
  extern char *consistent;
-- 
Brian L. Matthews  blm@cxsea.UUCP   ...{mnetor,uw-beaver!ssc-vax}!cxsea!blm
+1 206 251 6098    Computer X Inc. - a division of Motorola New Enterprises
Technical Details
Message-ID: <2660@cxsea.UUCP>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!rutgers!mcdchg!cxhq!cxsea!blm

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!rutgers!mcdchg!cxhq!cxsea!blm
From: blm@cxsea.UUCP (Brian Matthews)
Newsgroups: gnu.utils.bug
Subject: bison bugs and fixes
Message-ID: <2660@cxsea.UUCP>
Date: 11 Apr 89 18:13:01 GMT
Reply-To: blm@cxsea.UUCP (Brian Matthews)
Organization: Computer X Inc.
Lines: 53