Re: oaf-0.6.6 (fwd)



---------- Forwarded message ----------
Date: Wed, 10 Oct 2001 23:01:30 -0700
From: Mike Castle <dalgoda ix netcom com>
Subject: Re: oaf-0.6.6

On Wed, Oct 10, 2001 at 10:56:54AM -0400, Elliot Lee wrote:
> On Tue, 9 Oct 2001, Mike Castle wrote:
> 
> > `YYSTACK_USE_ALLOCA'
> >      Macro used to control the use of `alloca'. If defined to `0', the
> >      parser will not use `alloca' but `malloc' when trying to grow its
> >      internal stacks. Do _not_ define `YYSTACK_USE_ALLOCA' to anything
> >      else.
> > 
> > Both not defining it or defining it to 0 allow the system to compile.
> 
> If bison has a bug when this is defined, I don't see any reason why the
> fix should be in oaf. You should talk to the bison authors to fill them in
> on why this feature doesn't work...


No.  The bug is in how oaf defines the value.

ac-query-parse.y has the line:

#define YYSTACK_USE_ALLOCA

The documentation for bison explicitly states that that is incorrect.

The following patch works:

===
diff -ru oaf-0.6.6.orig/oafd/ac-query-parse.y oaf-0.6.6/oafd/ac-query-parse.y
--- oaf-0.6.6.orig/oafd/ac-query-parse.y        Tue Aug  7 19:14:35 2001
+++ oaf-0.6.6/oafd/ac-query-parse.y     Tue Oct  9 20:19:14 2001
@@ -23,8 +23,6 @@
  */

 %{
-#define YYSTACK_USE_ALLOCA
-
 #include <glib.h>

 #include "ac-query-expr.h"
===

mrc
-- 
     Mike Castle      dalgoda ix netcom com      www.netcom.com/~dalgoda/
    We are all of us living in the shadow of Manhattan.  -- Watchmen
fatal ("You are in a maze of twisty compiler features, all different"); -- gcc





[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]