From MAILER-DAEMON Tue Apr 01 02:45:42 2003
Received: from list by monty-python.gnu.org with archive (Exim 4.10.13)
	id 190GRN-0006to-00
	for mharc-bug-bison@gnu.org; Tue, 01 Apr 2003 02:44:17 -0500
Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.10.13)
	id 190GQ9-0006J3-00
	for bug-bison@gnu.org; Tue, 01 Apr 2003 02:43:01 -0500
Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.10.13)
	id 190GPg-0005yc-00
	for bug-bison@gnu.org; Tue, 01 Apr 2003 02:42:32 -0500
Received: from hermes.epita.fr ([163.5.255.10] helo=epita.fr)
	by monty-python.gnu.org with esmtp (Exim 4.10.13)
	id 190GPY-0005jZ-00; Tue, 01 Apr 2003 02:42:24 -0500
Received: from kualalumpur.lrde.epita.fr (mail@kualalumpur.lrde.epita.fr
	[10.223.13.1])	by epita.fr id h317gMx29516
	Tue, 1 Apr 2003 09:42:22 +0200 (MEST)
Received: from nostromo.lrde.epita.fr ([10.223.13.52] ident=mail)
	by kualalumpur.lrde.epita.fr with esmtp (Exim 3.35 #1 (Debian))
	id 190GQI-0001ej-00; Tue, 01 Apr 2003 09:43:10 +0200
Received: from akim by nostromo.lrde.epita.fr with local (Exim 3.36 #1
	(Debian))	id 190GQH-0001d0-00; Tue, 01 Apr 2003 09:43:09 +0200
To: Sebastian Bergmann <sb@sebastian-bergmann.de>
From: Akim Demaille <akim@epita.fr>
Date: Tue, 01 Apr 2003 09:43:09 +0200
In-Reply-To: <b694o6$5bm$1@main.gmane.org> (Sebastian Bergmann's message of
 "Mon, 31 Mar 2003 12:21:17 +0200")
Message-ID: <mv4d6k6oe7m.fsf@nostromo.lrde.epita.fr>
User-Agent: Gnus/5.090016 (Oort Gnus v0.16) Emacs/21.2 (gnu/linux)
References: <b5veft$slr$1@main.gmane.org>
	<mv4brzv7kc4.fsf@nostromo.lrde.epita.fr> <b61o0n$6b3$1@main.gmane.org>
	<mv4he9juarr.fsf@nostromo.lrde.epita.fr> <b694o6$5bm$1@main.gmane.org>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Sender: Akim Demaille <akim@lrde.epita.fr>
cc: help-bison@gnu.org
cc: bug-bison@gnu.org
Subject: Re: Segfault with PHP and bison 1.875(a)
X-BeenThere: bug-bison@gnu.org
X-Mailman-Version: 2.1b5
Precedence: list
List-Id: Bug reports for Bison, the GNU parser generator <bug-bison.gnu.org>
List-Help: <mailto:bug-bison-request@gnu.org?subject=help>
List-Post: <mailto:bug-bison@gnu.org>
List-Subscribe: <http://mail.gnu.org/mailman/listinfo/bug-bison>,
	<mailto:bug-bison-request@gnu.org?subject=subscribe>
List-Archive: <http://mail.gnu.org/pipermail/bug-bison>
List-Unsubscribe: <http://mail.gnu.org/mailman/listinfo/bug-bison>,
	<mailto:bug-bison-request@gnu.org?subject=unsubscribe>
X-List-Received-Date: Tue, 01 Apr 2003 07:44:11 -0000


 Sebastian> Akim Demaille wrote:
 >> I'll need more details then.

 Sebastian> How can I help you, what details do you need?

What system do you run?  What options are you using?  I see valgrind
becoming crazy on Bison when LC_ALL is not posix and --verbose is
used: do you have internationalization enabled?  What if you disable
them?



From MAILER-DAEMON Tue Apr 01 05:52:10 2003
Received: from list by monty-python.gnu.org with archive (Exim 4.10.13)
	id 190JMy-00078k-00
	for mharc-bug-bison@gnu.org; Tue, 01 Apr 2003 05:51:56 -0500
Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.10.13)
	id 190JMu-00073e-00
	for bug-bison@gnu.org; Tue, 01 Apr 2003 05:51:52 -0500
Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.10.13)
	id 190JMs-00070q-00
	for bug-bison@gnu.org; Tue, 01 Apr 2003 05:51:50 -0500
Received: from main.gmane.org ([80.91.224.249])
	by monty-python.gnu.org with esmtp (Exim 4.10.13)
	id 190JMT-0006df-00
	for bug-bison@gnu.org; Tue, 01 Apr 2003 05:51:25 -0500
Received: from root by main.gmane.org with local (Exim 3.35 #1 (Debian))
	id 190JLO-0001uD-00
	for <bug-bison@gnu.org>; Tue, 01 Apr 2003 12:50:18 +0200
X-Injected-Via-Gmane: http://gmane.org/
To: bug-bison@gnu.org
Received: from news by main.gmane.org with local (Exim 3.35 #1 (Debian))
	id 190JCk-0001LA-00
	for <gmane-comp-parsers-bison-general@m.gmane.org>;
	Tue, 01 Apr 2003 12:41:22 +0200
From: Sebastian Bergmann <sb@sebastian-bergmann.de>
Date: Tue, 01 Apr 2003 12:41:29 +0200
Organization: www.sebastian-bergmann.de
Lines: 18
Message-ID: <b6bqch$513$1@main.gmane.org>
References: <b5veft$slr$1@main.gmane.org>
 <mv4brzv7kc4.fsf@nostromo.lrde.epita.fr> <b61o0n$6b3$1@main.gmane.org>
 <mv4he9juarr.fsf@nostromo.lrde.epita.fr> <b694o6$5bm$1@main.gmane.org>
 <mv4d6k6oe7m.fsf@nostromo.lrde.epita.fr>
X-Complaints-To: usenet@main.gmane.org
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US;
	rv:1.3) Gecko/20030312
X-Accept-Language: de, en
In-Reply-To: <mv4d6k6oe7m.fsf@nostromo.lrde.epita.fr>
X-Enigmail-Version: 0.74.0.0
X-Enigmail-Supports: pgp-inline, pgp-mime
Sender: news <news@main.gmane.org>
cc: help-bison@gnu.org
Subject: Re: Segfault with PHP and bison 1.875(a)
X-BeenThere: bug-bison@gnu.org
X-Mailman-Version: 2.1b5
Precedence: list
List-Id: Bug reports for Bison, the GNU parser generator <bug-bison.gnu.org>
List-Help: <mailto:bug-bison-request@gnu.org?subject=help>
List-Post: <mailto:bug-bison@gnu.org>
List-Subscribe: <http://mail.gnu.org/mailman/listinfo/bug-bison>,
	<mailto:bug-bison-request@gnu.org?subject=subscribe>
List-Archive: <http://mail.gnu.org/pipermail/bug-bison>
List-Unsubscribe: <http://mail.gnu.org/mailman/listinfo/bug-bison>,
	<mailto:bug-bison-request@gnu.org?subject=unsubscribe>
X-List-Received-Date: Tue, 01 Apr 2003 10:51:54 -0000

Akim Demaille wrote:
> What system do you run?

  Linux 2.4.18.

> do you have internationalization enabled?

  I am not sure; I built bison using

    ./configure --prefix=/usr/local

  with no other configuration directive.

-- 
  Sebastian Bergmann
  http://sebastian-bergmann.de/                 http://phpOpenTracker.de/

  Did I help you? Consider a gift: http://wishlist.sebastian-bergmann.de/




From MAILER-DAEMON Tue Apr 01 07:59:28 2003
Received: from list by monty-python.gnu.org with archive (Exim 4.10.13)
	id 190LG8-0006iG-00
	for mharc-bug-bison@gnu.org; Tue, 01 Apr 2003 07:53:00 -0500
Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.10.13)
	id 190LCd-0005vc-00
	for bug-bison@gnu.org; Tue, 01 Apr 2003 07:49:23 -0500
Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.10.13)
	id 190L9a-0004Iq-00
	for bug-bison@gnu.org; Tue, 01 Apr 2003 07:46:15 -0500
Received: from hq.fandra.org ([212.118.47.27] helo=hq2.fandra.org)
	by monty-python.gnu.org with esmtp (Exim 4.10.13)
	id 190L9N-0004DC-00
	for bug-bison@gnu.org; Tue, 01 Apr 2003 07:46:02 -0500
Received: from basalt.office.altlinux.org (localhost.localdomain [127.0.0.1])
	by hq2.fandra.org (Postfix) with ESMTP id 6A02E4F
	for <bug-bison@gnu.org>; Tue,  1 Apr 2003 16:45:58 +0400 (MSD)
Received: by basalt.office.altlinux.org (Postfix, from userid 502)
	id 525FD8E5; Tue,  1 Apr 2003 16:45:54 +0400 (MSD)
Date: Tue, 1 Apr 2003 16:45:54 +0400
From: Stanislav Ievlev <inger@altlinux.org>
To: bug-bison@gnu.org
Message-ID: <20030401124554.GA7987@basalt.office.altlinux.org>
Mime-Version: 1.0
Content-Type: multipart/mixed; boundary="gBBFr7Ir9EOA20Yy"
Content-Disposition: inline
Subject: unused declaration don't works
X-BeenThere: bug-bison@gnu.org
X-Mailman-Version: 2.1b5
Precedence: list
List-Id: Bug reports for Bison, the GNU parser generator <bug-bison.gnu.org>
List-Help: <mailto:bug-bison-request@gnu.org?subject=help>
List-Post: <mailto:bug-bison@gnu.org>
List-Subscribe: <http://mail.gnu.org/mailman/listinfo/bug-bison>,
	<mailto:bug-bison-request@gnu.org?subject=subscribe>
List-Archive: <http://mail.gnu.org/pipermail/bug-bison>
List-Unsubscribe: <http://mail.gnu.org/mailman/listinfo/bug-bison>,
	<mailto:bug-bison-request@gnu.org?subject=unsubscribe>
X-List-Received-Date: Tue, 01 Apr 2003 12:52:58 -0000


--gBBFr7Ir9EOA20Yy
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline

Hello friends!

My gcc compiller (3.2.1) cannot compile code(pwlib-1.3.11;pwlib/tools/asnparser/asn_grammar.cxx) 
produced by bison(1.875) , because, some __unused__ declaration are in wrong places (see patch in attach).

--

With best regards
Stanislav Ievlev.


--gBBFr7Ir9EOA20Yy
Content-Type: text/plain; charset=us-ascii
Content-Disposition: attachment; filename="bison-1.875-alt-no-unused.patch"

diff -Naur bison-1.875/data/yacc.c bison-1.875.new/data/yacc.c
--- bison-1.875/data/yacc.c	2002-12-28 11:36:02 +0300
+++ bison-1.875.new/data/yacc.c	2003-04-01 16:32:24 +0400
@@ -1111,11 +1111,6 @@
 `----------------------------------------------------*/
 yyerrlab1:
 
-  /* Suppress GCC warning that yyerrlab1 is unused when no action
-     invokes YYERROR.  */
-#if defined (__GNUC_MINOR__) && 2093 <= (__GNUC__ * 1000 + __GNUC_MINOR__)
-  __attribute__ ((__unused__))
-#endif
 
 ]b4_location_if([  yylerrsp = yylsp;
   *++yylerrsp = yyloc;])[
diff -Naur bison-1.875/src/parse-gram.c bison-1.875.new/src/parse-gram.c
--- bison-1.875/src/parse-gram.c	2003-01-01 12:30:44 +0300
+++ bison-1.875.new/src/parse-gram.c	2003-04-01 16:32:34 +0400
@@ -1733,11 +1733,6 @@
 `----------------------------------------------------*/
 yyerrlab1:
 
-  /* Suppress GCC warning that yyerrlab1 is unused when no action
-     invokes YYERROR.  */
-#if defined (__GNUC_MINOR__) && 2093 <= (__GNUC__ * 1000 + __GNUC_MINOR__)
-  __attribute__ ((__unused__))
-#endif
 
   yylerrsp = yylsp;
   *++yylerrsp = yyloc;

--gBBFr7Ir9EOA20Yy--



From MAILER-DAEMON Tue Apr 01 11:06:12 2003
Received: from list by monty-python.gnu.org with archive (Exim 4.10.13)
	id 190OGG-0003DI-00
	for mharc-bug-bison@gnu.org; Tue, 01 Apr 2003 11:05:20 -0500
Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.10.13)
	id 190OFr-0002I8-00
	for bug-bison@gnu.org; Tue, 01 Apr 2003 11:04:55 -0500
Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.10.13)
	id 190OFj-0001xR-00
	for bug-bison@gnu.org; Tue, 01 Apr 2003 11:04:49 -0500
Received: from hermes.epita.fr ([163.5.255.10] helo=epita.fr)
	by monty-python.gnu.org with esmtp (Exim 4.10.13)
	id 190OEw-0000zs-00; Tue, 01 Apr 2003 11:04:00 -0500
Received: from kualalumpur.lrde.epita.fr (mail@kualalumpur.lrde.epita.fr
	[10.223.13.1])	by epita.fr id h31G3lx21789
	Tue, 1 Apr 2003 18:03:47 +0200 (MEST)
Received: from nostromo.lrde.epita.fr ([10.223.13.52] ident=mail)
	by kualalumpur.lrde.epita.fr with esmtp (Exim 3.35 #1 (Debian))
	id 190OFj-00009s-00; Tue, 01 Apr 2003 18:04:47 +0200
Received: from akim by nostromo.lrde.epita.fr with local (Exim 3.36 #1
	(Debian))	id 190OFj-0001bG-00; Tue, 01 Apr 2003 18:04:47 +0200
To: Sebastian Bergmann <sb@sebastian-bergmann.de>
From: Akim Demaille <akim@epita.fr>
Date: Tue, 01 Apr 2003 18:04:47 +0200
In-Reply-To: <b6bqch$513$1@main.gmane.org> (Sebastian Bergmann's message of
 "Tue, 01 Apr 2003 12:41:29 +0200")
Message-ID: <mv41y0mkxuo.fsf@nostromo.lrde.epita.fr>
User-Agent: Gnus/5.090016 (Oort Gnus v0.16) Emacs/21.2 (gnu/linux)
References: <b5veft$slr$1@main.gmane.org>
	<mv4brzv7kc4.fsf@nostromo.lrde.epita.fr> <b61o0n$6b3$1@main.gmane.org>
	<mv4he9juarr.fsf@nostromo.lrde.epita.fr> <b694o6$5bm$1@main.gmane.org>
	<mv4d6k6oe7m.fsf@nostromo.lrde.epita.fr> <b6bqch$513$1@main.gmane.org>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Sender: Akim Demaille <akim@lrde.epita.fr>
cc: bug-bison@gnu.org
cc: help-bison@gnu.org
Subject: Re: Segfault with PHP and bison 1.875(a)
X-BeenThere: bug-bison@gnu.org
X-Mailman-Version: 2.1b5
Precedence: list
List-Id: Bug reports for Bison, the GNU parser generator <bug-bison.gnu.org>
List-Help: <mailto:bug-bison-request@gnu.org?subject=help>
List-Post: <mailto:bug-bison@gnu.org>
List-Subscribe: <http://mail.gnu.org/mailman/listinfo/bug-bison>,
	<mailto:bug-bison-request@gnu.org?subject=subscribe>
List-Archive: <http://mail.gnu.org/pipermail/bug-bison>
List-Unsubscribe: <http://mail.gnu.org/mailman/listinfo/bug-bison>,
	<mailto:bug-bison-request@gnu.org?subject=unsubscribe>
X-List-Received-Date: Tue, 01 Apr 2003 16:05:17 -0000


 Sebastian> Akim Demaille wrote:
 >> What system do you run?

 Sebastian> Linux 2.4.18.

 >> do you have internationalization enabled?

 Sebastian> I am not sure; I built bison using

 Sebastian> ./configure --prefix=/usr/local

 Sebastian> with no other configuration directive.

Could you show exactly (copy paste from the terminal) how you ran
bison?  Could you try the same prepending

        env LC_ALL=C

to the command line?

Thanks!



From MAILER-DAEMON Tue Apr 01 11:08:32 2003
Received: from list by monty-python.gnu.org with archive (Exim 4.10.13)
	id 190OIT-0005NR-00
	for mharc-bug-bison@gnu.org; Tue, 01 Apr 2003 11:07:37 -0500
Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.10.13)
	id 190OHR-0004O3-00
	for bug-bison@gnu.org; Tue, 01 Apr 2003 11:06:33 -0500
Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.10.13)
	id 190OH5-0003xn-00
	for bug-bison@gnu.org; Tue, 01 Apr 2003 11:06:11 -0500
Received: from hermes.epita.fr ([163.5.255.10] helo=epita.fr)
	by monty-python.gnu.org with esmtp (Exim 4.10.13)
	id 190OFb-0001bf-00
	for bug-bison@gnu.org; Tue, 01 Apr 2003 11:04:41 -0500
Received: from kualalumpur.lrde.epita.fr (kualalumpur.lrde.epita.fr
	[10.223.13.1])	by epita.fr id h31G4Hx21876
	Tue, 1 Apr 2003 18:04:17 +0200 (MEST)
Received: from nostromo.lrde.epita.fr ([10.223.13.52] ident=mail)
	by kualalumpur.lrde.epita.fr with esmtp (Exim 3.35 #1 (Debian))
	id 190OG8-0000AD-00; Tue, 01 Apr 2003 18:05:12 +0200
Received: from akim by nostromo.lrde.epita.fr with local (Exim 3.36 #1
	(Debian))	id 190OG8-0001bM-00; Tue, 01 Apr 2003 18:05:12 +0200
To: Stanislav Ievlev <inger@altlinux.org>
From: Akim Demaille <akim@epita.fr>
Date: Tue, 01 Apr 2003 18:05:12 +0200
In-Reply-To: <20030401124554.GA7987@basalt.office.altlinux.org> (Stanislav
 Ievlev's message of "Tue, 1 Apr 2003 16:45:54 +0400")
Message-ID: <mv4y92ujj9j.fsf@nostromo.lrde.epita.fr>
User-Agent: Gnus/5.090016 (Oort Gnus v0.16) Emacs/21.2 (gnu/linux)
References: <20030401124554.GA7987@basalt.office.altlinux.org>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Sender: Akim Demaille <akim@lrde.epita.fr>
cc: bug-bison@gnu.org
Subject: Re: unused declaration don't works
X-BeenThere: bug-bison@gnu.org
X-Mailman-Version: 2.1b5
Precedence: list
List-Id: Bug reports for Bison, the GNU parser generator <bug-bison.gnu.org>
List-Help: <mailto:bug-bison-request@gnu.org?subject=help>
List-Post: <mailto:bug-bison@gnu.org>
List-Subscribe: <http://mail.gnu.org/mailman/listinfo/bug-bison>,
	<mailto:bug-bison-request@gnu.org?subject=subscribe>
List-Archive: <http://mail.gnu.org/pipermail/bug-bison>
List-Unsubscribe: <http://mail.gnu.org/mailman/listinfo/bug-bison>,
	<mailto:bug-bison-request@gnu.org?subject=unsubscribe>
X-List-Received-Date: Tue, 01 Apr 2003 16:07:35 -0000

Thanks, this issue is fixed in the current work version.



From MAILER-DAEMON Tue Apr 01 13:55:06 2003
Received: from list by monty-python.gnu.org with archive (Exim 4.10.13)
	id 190Qty-0000jQ-00
	for mharc-bug-bison@gnu.org; Tue, 01 Apr 2003 13:54:30 -0500
Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.10.13)
	id 190QpI-0006wL-00
	for bug-bison@gnu.org; Tue, 01 Apr 2003 13:49:40 -0500
Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.10.13)
	id 190QmS-0004qa-00
	for bug-bison@gnu.org; Tue, 01 Apr 2003 13:46:45 -0500
Received: from mailman.cs.ucla.edu ([131.179.128.30])
	by monty-python.gnu.org with esmtp (Exim 4.10.13)
	id 190QiC-0002rY-00
	for bug-bison@gnu.org; Tue, 01 Apr 2003 13:42:20 -0500
Received: from whale.cs.ucla.edu (whale [131.179.128.40])
	h31IgGF03528;	Tue, 1 Apr 2003 10:42:16 -0800 (PST)
Received: (from eggert@localhost)
	by whale.cs.ucla.edu (8.11.6+Sun/8.11.6/UCLACS-5.2) id h31IgGe08070;
	Tue, 1 Apr 2003 10:42:16 -0800 (PST)
To: Larry Rosenman <ler@lerctr.org>
References: <296990000.1049149144@lerlaptop.iadfw.net>
	<vi87kafm4re.fsf@cs.ucla.edu>
	<31650000.1049158341@lerlaptop.lerctr.org>
From: Paul Eggert <eggert@CS.UCLA.EDU>
Date: 01 Apr 2003 10:42:16 -0800
In-Reply-To: <31650000.1049158341@lerlaptop.lerctr.org>
Message-ID: <vi88yuuukjb.fsf@cs.ucla.edu>
Lines: 16
User-Agent: Gnus/5.0808 (Gnus v5.8.8) Emacs/20.3
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
cc: bug-bison@gnu.org
Subject: Re: BISON 1.875 on UnixWare 7.1.3 (fwd)
X-BeenThere: bug-bison@gnu.org
X-Mailman-Version: 2.1b5
Precedence: list
List-Id: Bug reports for Bison, the GNU parser generator <bug-bison.gnu.org>
List-Help: <mailto:bug-bison-request@gnu.org?subject=help>
List-Post: <mailto:bug-bison@gnu.org>
List-Subscribe: <http://mail.gnu.org/mailman/listinfo/bug-bison>,
	<mailto:bug-bison-request@gnu.org?subject=subscribe>
List-Archive: <http://mail.gnu.org/pipermail/bug-bison>
List-Unsubscribe: <http://mail.gnu.org/mailman/listinfo/bug-bison>,
	<mailto:bug-bison-request@gnu.org?subject=unsubscribe>
X-List-Received-Date: Tue, 01 Apr 2003 18:54:29 -0000

Larry Rosenman <ler@lerctr.org> writes:

> If I try to
> run bison -v, without LD_LIBRARY_PATH it whines about a missing
> libintl.so.1, with LD_LIBRARY_PATH for /usr/local/lib, I get an
> immediate coredump.

This makes it sound like Bison or your host wasn't configured properly.

Try building and installing a fresh copy of GNU libiconv
<ftp://ftp.gnu.org/gnu/libiconv/libiconv-1.8.tar.gz> and GNU gettext
<ftp://ftp.gnu.org/gnu/gettext/gettext-0.11.5.tar.gz>, and make sure
you're pointing to them properly when configuring a fresh copy of Bison.

Or, if that's too much trouble, try configuring Bison with
"configure --disable-nls".



From MAILER-DAEMON Tue Apr 01 13:57:04 2003
Received: from list by monty-python.gnu.org with archive (Exim 4.10.13)
	id 190Qut-0001FP-00
	for mharc-bug-bison@gnu.org; Tue, 01 Apr 2003 13:55:27 -0500
Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.10.13)
	id 190Quk-00018O-00
	for bug-bison@gnu.org; Tue, 01 Apr 2003 13:55:18 -0500
Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.10.13)
	id 190QqJ-0007gV-00
	for bug-bison@gnu.org; Tue, 01 Apr 2003 13:50:45 -0500
Received: from lerami.lerctr.org ([207.158.72.11])
	by monty-python.gnu.org with esmtp (Exim 4.10.13)
	id 190Qpm-0007Jb-00
	for bug-bison@gnu.org; Tue, 01 Apr 2003 13:50:10 -0500
Received: from lerlaptop.iadfw.net (lerlaptop.iadfw.net [206.66.13.21])
	(authenticated bits=0)h31Io5YC004657;
	Tue, 1 Apr 2003 12:50:05 -0600 (CST)
Date: Tue, 01 Apr 2003 12:50:05 -0600
From: Larry Rosenman <ler@lerctr.org>
To: Paul Eggert <eggert@CS.UCLA.EDU>
Message-ID: <175100000.1049223005@lerlaptop.iadfw.net>
In-Reply-To: <vi88yuuukjb.fsf@cs.ucla.edu>
References: <296990000.1049149144@lerlaptop.iadfw.net>
	<31650000.1049158341@lerlaptop.lerctr.org>
	<vi88yuuukjb.fsf@cs.ucla.edu>
X-Mailer: Mulberry/3.0.3 (Linux/x86)
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii; format=flowed
Content-Transfer-Encoding: 7bit
Content-Disposition: inline
X-Virus-Scanned: by amavisd-milter (http://amavis.org/)
cc: bug-bison@gnu.org
Subject: Re: BISON 1.875 on UnixWare 7.1.3 (fwd)
X-BeenThere: bug-bison@gnu.org
X-Mailman-Version: 2.1b5
Precedence: list
List-Id: Bug reports for Bison, the GNU parser generator <bug-bison.gnu.org>
List-Help: <mailto:bug-bison-request@gnu.org?subject=help>
List-Post: <mailto:bug-bison@gnu.org>
List-Subscribe: <http://mail.gnu.org/mailman/listinfo/bug-bison>,
	<mailto:bug-bison-request@gnu.org?subject=subscribe>
List-Archive: <http://mail.gnu.org/pipermail/bug-bison>
List-Unsubscribe: <http://mail.gnu.org/mailman/listinfo/bug-bison>,
	<mailto:bug-bison-request@gnu.org?subject=unsubscribe>
X-List-Received-Date: Tue, 01 Apr 2003 18:55:26 -0000



--On Tuesday, April 01, 2003 10:42:16 -0800 Paul Eggert 
<eggert@CS.UCLA.EDU> wrote:

> Larry Rosenman <ler@lerctr.org> writes:
>
>> If I try to
>> run bison -v, without LD_LIBRARY_PATH it whines about a missing
>> libintl.so.1, with LD_LIBRARY_PATH for /usr/local/lib, I get an
>> immediate coredump.
>
> This makes it sound like Bison or your host wasn't configured properly.
>
> Try building and installing a fresh copy of GNU libiconv
> <ftp://ftp.gnu.org/gnu/libiconv/libiconv-1.8.tar.gz> and GNU gettext
> <ftp://ftp.gnu.org/gnu/gettext/gettext-0.11.5.tar.gz>, and make sure
> you're pointing to them properly when configuring a fresh copy of Bison.
>
> Or, if that's too much trouble, try configuring Bison with
> "configure --disable-nls".
I took the last option, for the moment, and it works just fine.

If you or any of the bison or other GNU projects would like an account on 
this box for
portability issues or development, I'm more than willing.

LER




-- 
Larry Rosenman                     http://www.lerctr.org/~ler
Phone: +1 972-414-9812                 E-Mail: ler@lerctr.org
US Mail: 1905 Steamboat Springs Drive, Garland, TX 75044-6749






From MAILER-DAEMON Tue Apr 01 14:18:05 2003
Received: from list by monty-python.gnu.org with archive (Exim 4.10.13)
	id 190RG1-0008Rl-00
	for mharc-bug-bison@gnu.org; Tue, 01 Apr 2003 14:17:17 -0500
Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.10.13)
	id 190RDz-0006zT-00
	for bug-bison@gnu.org; Tue, 01 Apr 2003 14:15:11 -0500
Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.10.13)
	id 190RCp-0005cv-00
	for bug-bison@gnu.org; Tue, 01 Apr 2003 14:14:02 -0500
Received: from main.gmane.org ([80.91.224.249])
	by monty-python.gnu.org with esmtp (Exim 4.10.13)
	id 190RAX-0004UB-00
	for bug-bison@gnu.org; Tue, 01 Apr 2003 14:11:37 -0500
Received: from root by main.gmane.org with local (Exim 3.35 #1 (Debian))
	id 190R9f-0005Wa-00
	for <bug-bison@gnu.org>; Tue, 01 Apr 2003 21:10:43 +0200
X-Injected-Via-Gmane: http://gmane.org/
To: bug-bison@gnu.org
Received: from news by main.gmane.org with local (Exim 3.35 #1 (Debian))
	id 190R4Z-00058c-00
	for <gmane-comp-parsers-bison-general@m.gmane.org>;
	Tue, 01 Apr 2003 21:05:27 +0200
From: Sebastian Bergmann <sb@sebastian-bergmann.de>
Date: Tue, 01 Apr 2003 21:07:35 +0200
Organization: www.sebastian-bergmann.de
Lines: 16
Message-ID: <b6cntn$j99$1@main.gmane.org>
References: <b5veft$slr$1@main.gmane.org>
 <mv4brzv7kc4.fsf@nostromo.lrde.epita.fr> <b61o0n$6b3$1@main.gmane.org>
 <mv4he9juarr.fsf@nostromo.lrde.epita.fr> <b694o6$5bm$1@main.gmane.org>
 <mv4d6k6oe7m.fsf@nostromo.lrde.epita.fr> <b6bqch$513$1@main.gmane.org>
 <mv41y0mkxuo.fsf@nostromo.lrde.epita.fr>
X-Complaints-To: usenet@main.gmane.org
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US;
	rv:1.3) Gecko/20030312
X-Accept-Language: de, en
In-Reply-To: <mv41y0mkxuo.fsf@nostromo.lrde.epita.fr>
X-Enigmail-Version: 0.74.0.0
X-Enigmail-Supports: pgp-inline, pgp-mime
Sender: news <news@main.gmane.org>
cc: help-bison@gnu.org
Subject: Re: Segfault with PHP and bison 1.875(a)
X-BeenThere: bug-bison@gnu.org
X-Mailman-Version: 2.1b5
Precedence: list
List-Id: Bug reports for Bison, the GNU parser generator <bug-bison.gnu.org>
List-Help: <mailto:bug-bison-request@gnu.org?subject=help>
List-Post: <mailto:bug-bison@gnu.org>
List-Subscribe: <http://mail.gnu.org/mailman/listinfo/bug-bison>,
	<mailto:bug-bison-request@gnu.org?subject=subscribe>
List-Archive: <http://mail.gnu.org/pipermail/bug-bison>
List-Unsubscribe: <http://mail.gnu.org/mailman/listinfo/bug-bison>,
	<mailto:bug-bison-request@gnu.org?subject=unsubscribe>
X-List-Received-Date: Tue, 01 Apr 2003 19:17:16 -0000

Akim Demaille wrote:
> Could you show exactly (copy paste from the terminal) how you ran
> bison?

  bison -y -p ini_ -v -d zend_ini_parser.y -o zend_ini_parser.c

> Could you try the same prepending env LC_ALL=C

  The following crashes as well:
  LC_ALL=C bison -y -p ini_ -v -d zend_ini_parser.y -o zend_ini_parser.c

-- 
  Sebastian Bergmann
  http://sebastian-bergmann.de/                 http://phpOpenTracker.de/

  Did I help you? Consider a gift: http://wishlist.sebastian-bergmann.de/




From MAILER-DAEMON Tue Apr 01 16:17:39 2003
Received: from list by monty-python.gnu.org with archive (Exim 4.10.13)
	id 190T7a-0003KU-00
	for mharc-bug-bison@gnu.org; Tue, 01 Apr 2003 16:16:42 -0500
Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.10.13)
	id 190T6L-0001zx-00
	for bug-bison@gnu.org; Tue, 01 Apr 2003 16:15:25 -0500
Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.10.13)
	id 190T48-0000Rl-00
	for bug-bison@gnu.org; Tue, 01 Apr 2003 16:13:40 -0500
Received: from mailman.cs.ucla.edu ([131.179.128.30])
	by monty-python.gnu.org with esmtp (Exim 4.10.13)
	id 190T36-0007De-00
	for bug-bison@gnu.org; Tue, 01 Apr 2003 16:12:04 -0500
Received: from whale.cs.ucla.edu (whale [131.179.128.40])
	h31LBtF04095;	Tue, 1 Apr 2003 13:11:55 -0800 (PST)
Received: (from eggert@localhost)
	by whale.cs.ucla.edu (8.11.6+Sun/8.11.6/UCLACS-5.2) id h31LBtq26864;
	Tue, 1 Apr 2003 13:11:55 -0800 (PST)
To: Sebastian Bergmann <sb@sebastian-bergmann.de>
References: <b5veft$slr$1@main.gmane.org>
	<mv4brzv7kc4.fsf@nostromo.lrde.epita.fr> <b61o0n$6b3$1@main.gmane.org>
	<mv4he9juarr.fsf@nostromo.lrde.epita.fr> <b694o6$5bm$1@main.gmane.org>
	<mv4d6k6oe7m.fsf@nostromo.lrde.epita.fr> <b6bqch$513$1@main.gmane.org>
	<mv41y0mkxuo.fsf@nostromo.lrde.epita.fr> <b6cntn$j99$1@main.gmane.org>
From: Paul Eggert <eggert@CS.UCLA.EDU>
Date: 01 Apr 2003 13:11:55 -0800
In-Reply-To: <b6cntn$j99$1@main.gmane.org>
Message-ID: <vi8llytrkh0.fsf@cs.ucla.edu>
Lines: 13
User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.3
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
cc: bug-bison@gnu.org
Subject: Re: Segfault with PHP and bison 1.875(a)
X-BeenThere: bug-bison@gnu.org
X-Mailman-Version: 2.1b5
Precedence: list
List-Id: Bug reports for Bison, the GNU parser generator <bug-bison.gnu.org>
List-Help: <mailto:bug-bison-request@gnu.org?subject=help>
List-Post: <mailto:bug-bison@gnu.org>
List-Subscribe: <http://mail.gnu.org/mailman/listinfo/bug-bison>,
	<mailto:bug-bison-request@gnu.org?subject=subscribe>
List-Archive: <http://mail.gnu.org/pipermail/bug-bison>
List-Unsubscribe: <http://mail.gnu.org/mailman/listinfo/bug-bison>,
	<mailto:bug-bison-request@gnu.org?subject=unsubscribe>
X-List-Received-Date: Tue, 01 Apr 2003 21:16:41 -0000

Sebastian Bergmann <sb@sebastian-bergmann.de> writes:

>   The following crashes as well:
>   LC_ALL=C bison -y -p ini_ -v -d zend_ini_parser.y -o zend_ini_parser.c

That command worked for me; it did not crash.  I ran Bison 1.875a on
Solaris 7 sparc.

When you say "crashes", do you mean that Bison crashes, or that some
part of PHP crashes when it executes the code that Bison generates?
If the latter, we need complete instructions for building the program
that crashes, and for reproducing the crash.  Please assume that we
know nothing about PHP.



From MAILER-DAEMON Tue Apr 01 16:34:04 2003
Received: from list by monty-python.gnu.org with archive (Exim 4.10.13)
	id 190TMR-0003X6-00
	for mharc-bug-bison@gnu.org; Tue, 01 Apr 2003 16:32:03 -0500
Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.10.13)
	id 190TL7-00033I-00
	for bug-bison@gnu.org; Tue, 01 Apr 2003 16:30:41 -0500
Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.10.13)
	id 190TKn-0002n9-00
	for bug-bison@gnu.org; Tue, 01 Apr 2003 16:30:23 -0500
Received: from fw01.cmbrmaks.akamai.com ([80.67.64.10] helo=akamai.com)
	by monty-python.gnu.org with esmtp (Exim 4.10.13)
	id 190TJe-0001LU-00
	for bug-bison@gnu.org; Tue, 01 Apr 2003 16:29:10 -0500
Received: from akamai.com (vwall3.kendall.corp.akamai.com [172.17.4.35])
	by akamai.com (8.11.6+Sun/8.11.6) with ESMTP id h31LT8Y03345
	for <bug-bison@gnu.org>; Tue, 1 Apr 2003 16:29:08 -0500 (EST)
Received: from dhcp-24-7.kendall.corp.akamai.com
	(dhcp-26-3.kendall.corp.akamai.com [172.16.38.22])
	by akamai.com (8.11.6+Sun/8.11.6) with ESMTP id h31LT8P03339
	for <bug-bison@gnu.org>; Tue, 1 Apr 2003 16:29:08 -0500 (EST)
Received: (from pgoverea@localhost)
	by dhcp-24-7.kendall.corp.akamai.com (8.11.6/8.9.3) id h31LT8118637
	for bug-bison@gnu.org; Tue, 1 Apr 2003 16:29:08 -0500
Date: Tue, 1 Apr 2003 16:29:07 -0500
From: Paul Govereau <pgoverea@akamai.com>
To: bug-bison@gnu.org
Message-ID: <20030401212907.GA18613@akamai.com>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
User-Agent: Mutt/1.4i
Subject: Bison 1.875 coredump
X-BeenThere: bug-bison@gnu.org
X-Mailman-Version: 2.1b5
Precedence: list
List-Id: Bug reports for Bison, the GNU parser generator <bug-bison.gnu.org>
List-Help: <mailto:bug-bison-request@gnu.org?subject=help>
List-Post: <mailto:bug-bison@gnu.org>
List-Subscribe: <http://mail.gnu.org/mailman/listinfo/bug-bison>,
	<mailto:bug-bison-request@gnu.org?subject=subscribe>
List-Archive: <http://mail.gnu.org/pipermail/bug-bison>
List-Unsubscribe: <http://mail.gnu.org/mailman/listinfo/bug-bison>,
	<mailto:bug-bison-request@gnu.org?subject=unsubscribe>
X-List-Received-Date: Tue, 01 Apr 2003 21:32:01 -0000


Bison 1.875 will crash if the last rule does not have a semicolon
after it. e.g.

-------------
test.y:
  %%
  program : ID {}
  %%

$ bison test.y
Segmentation fault (core dumped)
---------------

This machine is an old:
  i686 unknown
  linux v2.2.12
  gnu libc v2.1.3
  gcc version egcs-2.91.66
 
Thanks,
Paul Govereau



From MAILER-DAEMON Tue Apr 01 19:44:51 2003
Received: from list by monty-python.gnu.org with archive (Exim 4.10.13)
	id 190WKu-0008FW-00
	for mharc-bug-bison@gnu.org; Tue, 01 Apr 2003 19:42:40 -0500
Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.10.13)
	id 190WKp-0008DR-00
	for bug-bison@gnu.org; Tue, 01 Apr 2003 19:42:35 -0500
Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.10.13)
	id 190WIj-0006uV-00
	for bug-bison@gnu.org; Tue, 01 Apr 2003 19:40:26 -0500
Received: from mailman.cs.ucla.edu ([131.179.128.30])
	by monty-python.gnu.org with esmtp (Exim 4.10.13)
	id 190WHR-0005I2-00
	for bug-bison@gnu.org; Tue, 01 Apr 2003 19:39:06 -0500
Received: from whale.cs.ucla.edu (whale [131.179.128.40])
	h320d4F05425;	Tue, 1 Apr 2003 16:39:04 -0800 (PST)
Received: (from eggert@localhost)
	by whale.cs.ucla.edu (8.11.6+Sun/8.11.6/UCLACS-5.2) id h320d4605753;
	Tue, 1 Apr 2003 16:39:04 -0800 (PST)
To: Paul Govereau <pgoverea@akamai.com>
References: <20030401212907.GA18613@akamai.com>
From: Paul Eggert <eggert@CS.UCLA.EDU>
Date: 01 Apr 2003 16:39:04 -0800
In-Reply-To: <20030401212907.GA18613@akamai.com>
Message-ID: <vi8vfxxpwbb.fsf@cs.ucla.edu>
Lines: 13
User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.3
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
cc: bug-bison@gnu.org
Subject: Re: Bison 1.875 coredump
X-BeenThere: bug-bison@gnu.org
X-Mailman-Version: 2.1b5
Precedence: list
List-Id: Bug reports for Bison, the GNU parser generator <bug-bison.gnu.org>
List-Help: <mailto:bug-bison-request@gnu.org?subject=help>
List-Post: <mailto:bug-bison@gnu.org>
List-Subscribe: <http://mail.gnu.org/mailman/listinfo/bug-bison>,
	<mailto:bug-bison-request@gnu.org?subject=subscribe>
List-Archive: <http://mail.gnu.org/pipermail/bug-bison>
List-Unsubscribe: <http://mail.gnu.org/mailman/listinfo/bug-bison>,
	<mailto:bug-bison-request@gnu.org?subject=unsubscribe>
X-List-Received-Date: Wed, 02 Apr 2003 00:42:39 -0000

Paul Govereau <pgoverea@akamai.com> writes:

> Bison 1.875 will crash if the last rule does not have a semicolon
> after it.

Thanks for your bug report.  I can't reproduce the bug in Bison test
version 1.875a, which you can get from:

<ftp://alpha.gnu.org/gnu/bison/bison-1.875a.tar.gz>

Can you please try that version?  It could be that the bug is
platform-specific.  Thanks.




From MAILER-DAEMON Wed Apr 02 00:42:21 2003
Received: from list by monty-python.gnu.org with archive (Exim 4.10.13)
	id 190b0n-0001ly-00
	for mharc-bug-bison@gnu.org; Wed, 02 Apr 2003 00:42:13 -0500
Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.10.13)
	id 190b0B-0001DB-00
	for bug-bison@gnu.org; Wed, 02 Apr 2003 00:41:35 -0500
Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.10.13)
	id 190b02-0000xG-00
	for bug-bison@gnu.org; Wed, 02 Apr 2003 00:41:28 -0500
Received: from main.gmane.org ([80.91.224.249])
	by monty-python.gnu.org with esmtp (Exim 4.10.13)
	id 190azS-0008WF-00
	for bug-bison@gnu.org; Wed, 02 Apr 2003 00:40:50 -0500
Received: from root by main.gmane.org with local (Exim 3.35 #1 (Debian))
	id 190azB-000241-00
	for <bug-bison@gnu.org>; Wed, 02 Apr 2003 07:40:33 +0200
X-Injected-Via-Gmane: http://gmane.org/
To: bug-bison@gnu.org
Received: from news by main.gmane.org with local (Exim 3.35 #1 (Debian))
	id 190asd-0001jy-00
	for <gmane-comp-parsers-bison-general@m.gmane.org>;
	Wed, 02 Apr 2003 07:33:47 +0200
From: Sebastian Bergmann <sb@sebastian-bergmann.de>
Date: Wed, 02 Apr 2003 07:35:45 +0200
Organization: www.sebastian-bergmann.de
Lines: 36
Message-ID: <b6dsnq$6h3$1@main.gmane.org>
References: <b5veft$slr$1@main.gmane.org>
 <mv4brzv7kc4.fsf@nostromo.lrde.epita.fr> <b61o0n$6b3$1@main.gmane.org>
 <mv4he9juarr.fsf@nostromo.lrde.epita.fr> <b694o6$5bm$1@main.gmane.org>
 <mv4d6k6oe7m.fsf@nostromo.lrde.epita.fr> <b6bqch$513$1@main.gmane.org>
 <mv41y0mkxuo.fsf@nostromo.lrde.epita.fr> <b6cntn$j99$1@main.gmane.org>
 <vi8llytrkh0.fsf@cs.ucla.edu>
X-Complaints-To: usenet@main.gmane.org
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US;
	rv:1.3) Gecko/20030312
X-Accept-Language: de, en
In-Reply-To: <vi8llytrkh0.fsf@cs.ucla.edu>
X-Enigmail-Version: 0.74.0.0
X-Enigmail-Supports: pgp-inline, pgp-mime
Sender: news <news@main.gmane.org>
cc: help-bison@gnu.org
Subject: Re: Segfault with PHP and bison 1.875(a)
X-BeenThere: bug-bison@gnu.org
X-Mailman-Version: 2.1b5
Precedence: list
List-Id: Bug reports for Bison, the GNU parser generator <bug-bison.gnu.org>
List-Help: <mailto:bug-bison-request@gnu.org?subject=help>
List-Post: <mailto:bug-bison@gnu.org>
List-Subscribe: <http://mail.gnu.org/mailman/listinfo/bug-bison>,
	<mailto:bug-bison-request@gnu.org?subject=subscribe>
List-Archive: <http://mail.gnu.org/pipermail/bug-bison>
List-Unsubscribe: <http://mail.gnu.org/mailman/listinfo/bug-bison>,
	<mailto:bug-bison-request@gnu.org?subject=unsubscribe>
X-List-Received-Date: Wed, 02 Apr 2003 05:42:11 -0000

Paul Eggert wrote:
> When you say "crashes", do you mean that Bison crashes, or that some
> part of PHP crashes when it executes the code that Bison generates?

  The part of PHP crashed when it executes the code that Bison
  generates.

> If the latter, we need complete instructions for building the program
> that crashes, and for reproducing the crash.

  Log in to the PHP anonymous CVS server. Use "phpfi" as the password:

    cvs -d:pserver:cvsread@cvs.php.net:/repository login

  Obtain the PHP 5 CVS tree:

    cvs -d:pserver:cvsread@cvs.php.net:/repository co -AP php5

  Build it:

    ./buildconf
    ./configure
    make

  Reproduce the segfault with

    ./sapi/cli/php

  Thanks for looking into this,
Sebastian

-- 
  Sebastian Bergmann
  http://sebastian-bergmann.de/                 http://phpOpenTracker.de/

  Did I help you? Consider a gift: http://wishlist.sebastian-bergmann.de/




From MAILER-DAEMON Wed Apr 02 02:42:58 2003
Received: from list by monty-python.gnu.org with archive (Exim 4.10.13)
	id 190ck5-0005x5-00
	for mharc-bug-bison@gnu.org; Wed, 02 Apr 2003 02:33:05 -0500
Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.10.13)
	id 190ciw-00059p-00
	for bug-bison@gnu.org; Wed, 02 Apr 2003 02:31:54 -0500
Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.10.13)
	id 190cfm-0003Lc-00
	for bug-bison@gnu.org; Wed, 02 Apr 2003 02:28:41 -0500
Received: from ol100-46.fibertel.com.ar ([24.232.46.100] helo=MailUser)
	by monty-python.gnu.org with smtp (Exim 4.10.13)
	id 190cco-0001lr-00
	for bug-bison@gnu.org; Wed, 02 Apr 2003 02:25:35 -0500
From: "LXTrans - Translation Services"<Promotions@lxtrans.com>
To: "" <bug-bison@gnu.org>
Sender: "LXTrans - Translation Services"<Promotions@lxtrans.com>
Mime-Version: 1.0
Content-Type: text/plain; charset="iso-8859-1"
Date: Tue, 1 Apr 2003 23:25:34 -0800
Message-Id: <E190cco-0001lr-00@monty-python.gnu.org>
Subject: English - Spanish Translation Services
X-BeenThere: bug-bison@gnu.org
X-Mailman-Version: 2.1b5
Precedence: list
Reply-To: Promotions@lxtrans.com
List-Id: Bug reports for Bison, the GNU parser generator <bug-bison.gnu.org>
List-Help: <mailto:bug-bison-request@gnu.org?subject=help>
List-Post: <mailto:bug-bison@gnu.org>
List-Subscribe: <http://mail.gnu.org/mailman/listinfo/bug-bison>,
	<mailto:bug-bison-request@gnu.org?subject=subscribe>
List-Archive: <http://mail.gnu.org/pipermail/bug-bison>
List-Unsubscribe: <http://mail.gnu.org/mailman/listinfo/bug-bison>,
	<mailto:bug-bison-request@gnu.org?subject=unsubscribe>
X-List-Received-Date: Wed, 02 Apr 2003 07:33:03 -0000

If your profession requires English-Spanish translation services, please visit our website and save the address for future reference:

LXTrans - Translation Services
http://www.lxtrans.com

LXTrans provides professional English-Spanish translation services at one of the lowest rates in the market. First-time customers will receive a 50% discount on their first translation project (up to 5,000 words at half our regular rate).

Visit our website and get an estimate of a translation cost instantly by using our online Quote Calculator.

Thank you for your attention,

The LXTrans Team.
LXTrans - Translation Services
2117 L Street NW #342 . 
Washington DC 20037-1524

We collect eMail contact addresses from various publicly available sources. We understand you may wish NOT to receive information from us by eMail. To be removed from this and other offers from LXTrans simply reply to this email with the word "UNSUBSCRIBE" in the subject line.




From MAILER-DAEMON Wed Apr 02 12:57:04 2003
Received: from list by monty-python.gnu.org with archive (Exim 4.10.13)
	id 190mTw-0001GZ-00
	for mharc-bug-bison@gnu.org; Wed, 02 Apr 2003 12:57:04 -0500
Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.10.13)
	id 190mTt-0001F3-00
	for bug-bison@gnu.org; Wed, 02 Apr 2003 12:57:01 -0500
Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.10.13)
	id 190mTr-0001Ct-00
	for bug-bison@gnu.org; Wed, 02 Apr 2003 12:56:59 -0500
Received: from fw01.cmbrmaks.akamai.com ([80.67.64.10] helo=akamai.com)
	by monty-python.gnu.org with esmtp (Exim 4.10.13)
	id 190mS7-0000Xv-00
	for bug-bison@gnu.org; Wed, 02 Apr 2003 12:55:12 -0500
Received: from akamai.com (vwall3.kendall.corp.akamai.com [172.17.4.35])
	by akamai.com (8.11.6+Sun/8.11.6) with ESMTP id h32HtA728866
	for <bug-bison@gnu.org>; Wed, 2 Apr 2003 12:55:10 -0500 (EST)
Received: from dhcp-24-7.kendall.corp.akamai.com
	(dhcp-26-3.kendall.corp.akamai.com [172.16.38.22])
	by akamai.com (8.11.6+Sun/8.11.6) with ESMTP id h32Ht9P07611;
	Wed, 2 Apr 2003 12:55:09 -0500 (EST)
Received: (from pgoverea@localhost)
	by dhcp-24-7.kendall.corp.akamai.com (8.11.6/8.9.3) id h32Ht9G31099;
	Wed, 2 Apr 2003 12:55:09 -0500
Date: Wed, 2 Apr 2003 12:55:09 -0500
From: Paul Govereau <pgoverea@akamai.com>
To: Paul Eggert <eggert@CS.UCLA.EDU>
Message-ID: <20030402175509.GA31090@akamai.com>
References: <20030401212907.GA18613@akamai.com> <vi8vfxxpwbb.fsf@cs.ucla.edu>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <vi8vfxxpwbb.fsf@cs.ucla.edu>
User-Agent: Mutt/1.4i
cc: bug-bison@gnu.org
Subject: Re: Bison 1.875 coredump
X-BeenThere: bug-bison@gnu.org
X-Mailman-Version: 2.1b5
Precedence: list
List-Id: Bug reports for Bison, the GNU parser generator <bug-bison.gnu.org>
List-Help: <mailto:bug-bison-request@gnu.org?subject=help>
List-Post: <mailto:bug-bison@gnu.org>
List-Subscribe: <http://mail.gnu.org/mailman/listinfo/bug-bison>,
	<mailto:bug-bison-request@gnu.org?subject=subscribe>
List-Archive: <http://mail.gnu.org/pipermail/bug-bison>
List-Unsubscribe: <http://mail.gnu.org/mailman/listinfo/bug-bison>,
	<mailto:bug-bison-request@gnu.org?subject=unsubscribe>
X-List-Received-Date: Wed, 02 Apr 2003 17:57:02 -0000


Thanks for your quick reply. I have tried version 1.875a with the same
results. I have done a little bit of investigation, and it seems like
the problem is parse-gram.y calling into reader.c with an invalid
pointer (loc.start.file). I have attached a stack trace below. Also, I
noticed that if I run bison with "--trace=scan" or "--trace=parse" it
does not crash, and seems to work fine. Once again, my inputs are:

%% A : B %%      --> core dump
%% A : B; %%     --> works fine
%% A : B         --> works fine

Thanks,
Paul Govereau

--- stack trace of core dump ---

pgoverea:/opt/bison-1.875a/dist>gdb ./bin/bison core 
GNU gdb 4.18
Copyright 1998 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB.  Type "show warranty" for details.
This GDB was configured as "i386-redhat-linux"...
Core was generated by `./bin/bison parse.y'.
Program terminated with signal 11, Segmentation fault.
Reading symbols from /lib/libc.so.6...done.
Reading symbols from /lib/ld-linux.so.2...done.
#0  0x806168f in quotearg_buffer_restyled (buffer=0x8073a40 "\"", 
    buffersize=256, arg=0x3 <Address 0x3 out of bounds>, argsize=4294967295, 
    quoting_style=c_quoting_style, o=0xbfffc37c) at quotearg.c:256
256       for (i = 0;  ! (argsize == SIZE_MAX ? arg[i] == '\0' : i == argsize);  i++)
(gdb) bt
#0  0x806168f in quotearg_buffer_restyled (buffer=0x8073a40 "\"", 
    buffersize=256, arg=0x3 <Address 0x3 out of bounds>, argsize=4294967295, 
    quoting_style=c_quoting_style, o=0xbfffc37c) at quotearg.c:256
#1  0x8061b47 in quotearg_buffer (buffer=0x8073a40 "\"", buffersize=256, 
    arg=0x3 <Address 0x3 out of bounds>, argsize=4294967295, o=0xbfffc37c)
    at quotearg.c:503
#2  0x8061c15 in quotearg_n_options (n=0, arg=0x3 <Address 0x3 out of bounds>, 
    argsize=4294967295, options=0xbfffc37c) at quotearg.c:560
#3  0x8061cfd in quotearg_n_style (n=0, s=c_quoting_style, 
    arg=0x3 <Address 0x3 out of bounds>) at quotearg.c:600
#4  0x8061d48 in quotearg_style (s=c_quoting_style, 
    arg=0x3 <Address 0x3 out of bounds>) at quotearg.c:614
#5  0x80565d8 in epilogue_augment (epilogue=0x807a7d4 "\n", loc={start = {
        file = 0x3 <Address 0x3 out of bounds>, line = 9, column = 134693576}, 
      end = {file = 0x80742c8 "parse.y", line = 5, column = 1}}) at reader.c:93
#6  0x8053fc0 in gram_parse () at parse-gram.y:399
#7  0x805702f in reader () at reader.c:501
#8  0x804d2ea in main (argc=2, argv=0xbffffce4) at main.c:80
(gdb) 

On Apr 01, Paul Eggert wrote:
> Paul Govereau <pgoverea@akamai.com> writes:
> 
> > Bison 1.875 will crash if the last rule does not have a semicolon
> > after it.
> 
> Thanks for your bug report.  I can't reproduce the bug in Bison test
> version 1.875a, which you can get from:
> 
> <ftp://alpha.gnu.org/gnu/bison/bison-1.875a.tar.gz>
> 
> Can you please try that version?  It could be that the bug is
> platform-specific.  Thanks.



From MAILER-DAEMON Wed Apr 02 16:18:30 2003
Received: from list by monty-python.gnu.org with archive (Exim 4.10.13)
	id 190pc9-00035q-00
	for mharc-bug-bison@gnu.org; Wed, 02 Apr 2003 16:17:45 -0500
Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.10.13)
	id 190pX7-0000Ct-00
	for bug-bison@gnu.org; Wed, 02 Apr 2003 16:12:33 -0500
Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.10.13)
	id 190pT8-0006zU-00
	for bug-bison@gnu.org; Wed, 02 Apr 2003 16:08:30 -0500
Received: from mailman.cs.ucla.edu ([131.179.128.30])
	by monty-python.gnu.org with esmtp (Exim 4.10.13)
	id 190pSx-0006pD-00
	for bug-bison@gnu.org; Wed, 02 Apr 2003 16:08:15 -0500
Received: from whale.cs.ucla.edu (whale [131.179.128.40])
	h32L8EF08558;	Wed, 2 Apr 2003 13:08:14 -0800 (PST)
Received: (from eggert@localhost)
	by whale.cs.ucla.edu (8.11.6+Sun/8.11.6/UCLACS-5.2) id h32L8DN25144;
	Wed, 2 Apr 2003 13:08:13 -0800 (PST)
To: Paul Govereau <pgoverea@akamai.com>
References: <20030401212907.GA18613@akamai.com> <vi8vfxxpwbb.fsf@cs.ucla.edu>
	<20030402175509.GA31090@akamai.com>
From: Paul Eggert <eggert@CS.UCLA.EDU>
Date: 02 Apr 2003 13:08:13 -0800
In-Reply-To: <20030402175509.GA31090@akamai.com>
Message-ID: <vi8pto47gle.fsf@cs.ucla.edu>
Lines: 152
User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.3
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
cc: bug-bison@gnu.org
Subject: Re: Bison 1.875 coredump
X-BeenThere: bug-bison@gnu.org
X-Mailman-Version: 2.1b5
Precedence: list
List-Id: Bug reports for Bison, the GNU parser generator <bug-bison.gnu.org>
List-Help: <mailto:bug-bison-request@gnu.org?subject=help>
List-Post: <mailto:bug-bison@gnu.org>
List-Subscribe: <http://mail.gnu.org/mailman/listinfo/bug-bison>,
	<mailto:bug-bison-request@gnu.org?subject=subscribe>
List-Archive: <http://mail.gnu.org/pipermail/bug-bison>
List-Unsubscribe: <http://mail.gnu.org/mailman/listinfo/bug-bison>,
	<mailto:bug-bison-request@gnu.org?subject=unsubscribe>
X-List-Received-Date: Wed, 02 Apr 2003 21:17:44 -0000

Paul Govereau <pgoverea@akamai.com> writes:

> I have done a little bit of investigation, and it seems like
> the problem is parse-gram.y calling into reader.c with an invalid
> pointer (loc.start.file). I have attached a stack trace below. Also, I
> noticed that if I run bison with "--trace=scan" or "--trace=parse" it
> does not crash, and seems to work fine. Once again, my inputs are:
> 
> %% A : B %%      --> core dump
> %% A : B; %%     --> works fine
> %% A : B         --> works fine

Thanks for the details.  On further investigation, I think this may
have been fixed in the latest CVS version of Bison.  Please try the
following cumulative patch relative to Bison 1.875a.

2003-03-12  Paul Eggert  <eggert@twinsun.com>

	* scan-gram.l (YY_USER_INIT): Initialize code_start, too.
	(<INITIAL><<EOF>>, <SC_PRE_CODE><<EOF>>): Set *loc to the scanner
	cursor, instead of leaving it undefined.  This fixes a bug
	reported by Tim Van Holder in
	<http://mail.gnu.org/archive/html/bug-bison/2003-03/msg00023.html>.

2003-03-01  Paul Eggert  <eggert@twinsun.com>

	* src/scan-gram.l (code_start): Initialize it to scanner_cursor,
	not loc->end, since loc->end might contain garbage and this leads
	to undefined behavior on some platforms.
	(id_loc, token_start): Use (IF_LINTed) initial values that do not
	depend on *loc, so that the reader doesn't give the the false
	impression that *loc is initialized.
	(<INITIAL>"%%"): Do not bother setting code_start, since its value
	does not survive the return.

2003-03-01  Akim Demaille  <akim@epita.fr>

	* src/scan-gram.l (code_start): Always initialize it when entering
	into yylex, as SC_EPILOGUE is activated *before* the corresponding
	yylex invocation.  An alternative would be making it static, but
	then it starts with the second %%'s beginning, instead of its end.

2003-02-03  Paul Eggert  <eggert@twinsun.com>

	* src/scan-gram.l (no_cr_read): Use bytes_read, not s, for size
	var.

Index: scan-gram.l
===================================================================
RCS file: /cvsroot/bison/bison/src/scan-gram.l,v
retrieving revision 1.54
retrieving revision 1.58
diff -p -u -r1.54 -r1.58
--- scan-gram.l	31 Dec 2002 02:26:51 -0000	1.54
+++ scan-gram.l	13 Mar 2003 07:07:17 -0000	1.58
@@ -1,6 +1,6 @@
 /* Bison Grammar Scanner                             -*- C -*-
 
-   Copyright (C) 2002 Free Software Foundation, Inc.
+   Copyright (C) 2002, 2003 Free Software Foundation, Inc.
 
    This file is part of Bison, the GNU Compiler Compiler.
 
@@ -43,6 +43,7 @@
       scanner_cursor.file = current_file;		\
       scanner_cursor.line = 1;				\
       scanner_cursor.column = 1;			\
+      code_start = scanner_cursor;			\
     }							\
   while (0)
 
@@ -136,14 +137,16 @@ splice	 (\\[ \f\t\v]*\n)*
   int token_type IF_LINT (= 0);
 
   /* Location of most recent identifier, when applicable.  */
-  location id_loc IF_LINT (= *loc);
+  location id_loc IF_LINT (= empty_location);
 
-  /* Where containing code started, when applicable.  */
-  boundary code_start IF_LINT (= loc->start);
+  /* Where containing code started, when applicable.  Its initial
+     value is relevant only when yylex is invoked in the SC_EPILOGUE
+     start condition.  */
+  boundary code_start = scanner_cursor;
 
   /* Where containing comment or string or character literal started,
      when applicable.  */
-  boundary token_start IF_LINT (= loc->start);
+  boundary token_start IF_LINT (= scanner_cursor);
 %}
 
 
@@ -270,16 +273,18 @@ splice	 (\\[ \f\t\v]*\n)*
   "%%" {
     static int percent_percent_count;
     if (++percent_percent_count == 2)
-      {
-	code_start = loc->start;
-	BEGIN SC_EPILOGUE;
-      }
+      BEGIN SC_EPILOGUE;
     return PERCENT_PERCENT;
   }
 
   . {
     complain_at (*loc, _("invalid character: %s"), quote (yytext));
   }
+
+  <<EOF>> {
+    loc->start = loc->end = scanner_cursor;
+    yyterminate ();
+  }
 }
 
 
@@ -530,6 +535,8 @@ splice	 (\\[ \f\t\v]*\n)*
 	return token_type;
       }
   }
+
+  <<EOF>>  unexpected_end_of_file (scanner_cursor, "{}");
 }
 
 
@@ -682,14 +689,14 @@ adjust_location (location *loc, char con
 static size_t
 no_cr_read (FILE *fp, char *buf, size_t size)
 {
-  size_t s = fread (buf, 1, size, fp);
-  if (s)
+  size_t bytes_read = fread (buf, 1, size, fp);
+  if (bytes_read)
     {
-      char *w = memchr (buf, '\r', s);
+      char *w = memchr (buf, '\r', bytes_read);
       if (w)
 	{
 	  char const *r = ++w;
-	  char const *lim = buf + s;
+	  char const *lim = buf + bytes_read;
 
 	  for (;;)
 	    {
@@ -718,7 +725,7 @@ no_cr_read (FILE *fp, char *buf, size_t 
 	}
     }
 
-  return s;
+  return bytes_read;
 }
 
 



From MAILER-DAEMON Wed Apr 02 17:29:27 2003
Received: from list by monty-python.gnu.org with archive (Exim 4.10.13)
	id 190qjW-0002pQ-00
	for mharc-bug-bison@gnu.org; Wed, 02 Apr 2003 17:29:26 -0500
Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.10.13)
	id 190qiC-00020l-00
	for bug-bison@gnu.org; Wed, 02 Apr 2003 17:28:04 -0500
Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.10.13)
	id 190qhk-0000r4-00
	for bug-bison@gnu.org; Wed, 02 Apr 2003 17:27:37 -0500
Received: from fw01.cmbrmaks.akamai.com ([80.67.64.10] helo=akamai.com)
	by monty-python.gnu.org with esmtp (Exim 4.10.13)
	id 190qhG-0000Is-00
	for bug-bison@gnu.org; Wed, 02 Apr 2003 17:27:06 -0500
Received: from akamai.com (vwall1.kendall.corp.akamai.com [172.17.4.33])
	by akamai.com (8.11.6+Sun/8.11.6) with ESMTP id h32MR5Y03161
	for <bug-bison@gnu.org>; Wed, 2 Apr 2003 17:27:05 -0500 (EST)
Received: from dhcp-24-7.kendall.corp.akamai.com
	(dhcp-26-3.kendall.corp.akamai.com [172.16.38.22])
	by akamai.com (8.11.6+Sun/8.11.6) with ESMTP id h32MR4a29817;
	Wed, 2 Apr 2003 17:27:04 -0500 (EST)
Received: (from pgoverea@localhost)
	by dhcp-24-7.kendall.corp.akamai.com (8.11.6/8.9.3) id h32MR4405257;
	Wed, 2 Apr 2003 17:27:04 -0500
Date: Wed, 2 Apr 2003 17:27:04 -0500
From: Paul Govereau <pgoverea@akamai.com>
To: Paul Eggert <eggert@CS.UCLA.EDU>
Message-ID: <20030402222704.GA5254@akamai.com>
References: <20030401212907.GA18613@akamai.com> <vi8vfxxpwbb.fsf@cs.ucla.edu>
	<20030402175509.GA31090@akamai.com> <vi8pto47gle.fsf@cs.ucla.edu>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <vi8pto47gle.fsf@cs.ucla.edu>
User-Agent: Mutt/1.4i
cc: bug-bison@gnu.org
Subject: Re: Bison 1.875 coredump
X-BeenThere: bug-bison@gnu.org
X-Mailman-Version: 2.1b5
Precedence: list
List-Id: Bug reports for Bison, the GNU parser generator <bug-bison.gnu.org>
List-Help: <mailto:bug-bison-request@gnu.org?subject=help>
List-Post: <mailto:bug-bison@gnu.org>
List-Subscribe: <http://mail.gnu.org/mailman/listinfo/bug-bison>,
	<mailto:bug-bison-request@gnu.org?subject=subscribe>
List-Archive: <http://mail.gnu.org/pipermail/bug-bison>
List-Unsubscribe: <http://mail.gnu.org/mailman/listinfo/bug-bison>,
	<mailto:bug-bison-request@gnu.org?subject=unsubscribe>
X-List-Received-Date: Wed, 02 Apr 2003 22:29:24 -0000


Yes, this patch fixes the problem - good show!
Thanks again for your quick response.

Paul

On Apr 02, Paul Eggert wrote:
> Paul Govereau <pgoverea@akamai.com> writes:
> 
> > I have done a little bit of investigation, and it seems like
> > the problem is parse-gram.y calling into reader.c with an invalid
> > pointer (loc.start.file). I have attached a stack trace below. Also, I
> > noticed that if I run bison with "--trace=scan" or "--trace=parse" it
> > does not crash, and seems to work fine. Once again, my inputs are:
> > 
> > %% A : B %%      --> core dump
> > %% A : B; %%     --> works fine
> > %% A : B         --> works fine
> 
> Thanks for the details.  On further investigation, I think this may
> have been fixed in the latest CVS version of Bison.  Please try the
> following cumulative patch relative to Bison 1.875a.
> 
> [... deleted ...]  
>  



From MAILER-DAEMON Thu Apr 03 03:12:35 2003
Received: from list by monty-python.gnu.org with archive (Exim 4.10.13)
	id 190znl-0002Og-00
	for mharc-bug-bison@gnu.org; Thu, 03 Apr 2003 03:10:25 -0500
Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.10.13)
	id 190znf-0002FU-00
	for bug-bison@gnu.org; Thu, 03 Apr 2003 03:10:19 -0500
Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.10.13)
	id 190zmO-0001OA-00
	for bug-bison@gnu.org; Thu, 03 Apr 2003 03:09:02 -0500
Received: from hermes.epita.fr ([163.5.255.10] helo=epita.fr)
	by monty-python.gnu.org with esmtp (Exim 4.10.13)
	id 190zm8-00007o-00; Thu, 03 Apr 2003 03:08:44 -0500
Received: from kualalumpur.lrde.epita.fr (mail@kualalumpur.lrde.epita.fr
	[10.223.13.1])	by epita.fr id h3388YN23463
	Thu, 3 Apr 2003 10:08:34 +0200 (MEST)
Received: from nostromo.lrde.epita.fr ([10.223.13.52] ident=mail)
	by kualalumpur.lrde.epita.fr with esmtp (Exim 3.35 #1 (Debian))
	id 190zmB-0003xo-00; Thu, 03 Apr 2003 10:08:47 +0200
Received: from akim by nostromo.lrde.epita.fr with local (Exim 3.36 #1
	(Debian))	id 190zmB-0002Kb-00; Thu, 03 Apr 2003 10:08:47 +0200
To: Sebastian Bergmann <sb@sebastian-bergmann.de>
From: Akim Demaille <akim@epita.fr>
Date: Thu, 03 Apr 2003 10:08:47 +0200
In-Reply-To: <b6dsnq$6h3$1@main.gmane.org> (Sebastian Bergmann's message of
 "Wed, 02 Apr 2003 07:35:45 +0200")
Message-ID: <mv4d6k4f1f4.fsf@nostromo.lrde.epita.fr>
User-Agent: Gnus/5.090016 (Oort Gnus v0.16) Emacs/21.2 (gnu/linux)
References: <b5veft$slr$1@main.gmane.org>
	<mv4brzv7kc4.fsf@nostromo.lrde.epita.fr> <b61o0n$6b3$1@main.gmane.org>
	<mv4he9juarr.fsf@nostromo.lrde.epita.fr> <b694o6$5bm$1@main.gmane.org>
	<mv4d6k6oe7m.fsf@nostromo.lrde.epita.fr> <b6bqch$513$1@main.gmane.org>
	<mv41y0mkxuo.fsf@nostromo.lrde.epita.fr> <b6cntn$j99$1@main.gmane.org>
	<vi8llytrkh0.fsf@cs.ucla.edu> <b6dsnq$6h3$1@main.gmane.org>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Sender: Akim Demaille <akim@lrde.epita.fr>
cc: bug-bison@gnu.org
cc: help-bison@gnu.org
Subject: Re: Segfault with PHP and bison 1.875(a)
X-BeenThere: bug-bison@gnu.org
X-Mailman-Version: 2.1b5
Precedence: list
List-Id: Bug reports for Bison, the GNU parser generator <bug-bison.gnu.org>
List-Help: <mailto:bug-bison-request@gnu.org?subject=help>
List-Post: <mailto:bug-bison@gnu.org>
List-Subscribe: <http://mail.gnu.org/mailman/listinfo/bug-bison>,
	<mailto:bug-bison-request@gnu.org?subject=subscribe>
List-Archive: <http://mail.gnu.org/pipermail/bug-bison>
List-Unsubscribe: <http://mail.gnu.org/mailman/listinfo/bug-bison>,
	<mailto:bug-bison-request@gnu.org?subject=unsubscribe>
X-List-Received-Date: Thu, 03 Apr 2003 08:10:23 -0000


 Sebastian> Reproduce the segfault with
 Sebastian> ./sapi/cli/php

Can't get anything.  What input did you try?  I tried several, and
observed no problem.

And by the way:

| /tmp/php/php5 % ./buildconf
| using default Zend directory
| buildconf: checking installation...
| buildconf: autoconf version 2.57 (ok)
| buildconf: Your version of autoconf likely contains buggy cache code.
|            Running cvsclean for you.
|            To avoid this, install autoconf-2.13 and automake-1.5.

This is the most weird advice I read about this.  Promoting 2.13 is silly.

| buildconf: automake version 1.7 (ok)
| buildconf: libtool version 1.4.3 (ok)
| WARNING: automake and libtool are installed in different
|          directories.  This may cause aclocal to fail.
|          continuing anyway
| rebuilding configure
| rebuilding acconfig.h
| rebuilding main/php_config.h.in
| WARNING: Using auxiliary files such as `acconfig.h', `config.h.bot'
| WARNING: and `config.h.top', to define templates for `config.h.in'
| WARNING: is deprecated and discouraged.
| 
| WARNING: Using the third argument of `AC_DEFINE' and
| WARNING: `AC_DEFINE_UNQUOTED' allows to define a template without
| WARNING: `acconfig.h':
| 
| WARNING:   AC_DEFINE([NEED_MAIN], 1,
| WARNING:             [Define if a function `main' is needed.])
| 
| WARNING: More sophisticated templates can also be produced, see the
| WARNING: documentation.



From MAILER-DAEMON Tue Apr 08 09:36:29 2003
Received: from list by monty-python.gnu.org with archive (Exim 4.10.13)
	id 192tGf-0007Pb-00
	for mharc-bug-bison@gnu.org; Tue, 08 Apr 2003 09:36:05 -0400
Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.10.13)
	id 192tGd-0007OK-00
	for bug-bison@gnu.org; Tue, 08 Apr 2003 09:36:03 -0400
Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.10.13)
	id 192tCO-0004Zi-00
	for bug-bison@gnu.org; Tue, 08 Apr 2003 09:31:42 -0400
Received: from smtp-102-tuesday.nerim.net ([62.4.16.102] helo=kraid.nerim.net)
	by monty-python.gnu.org with esmtp (Exim 4.10.13)
	id 192tCN-0004Xi-00
	for bug-bison@gnu.org; Tue, 08 Apr 2003 09:31:40 -0400
Received: from localhost (gadl.net1.nerim.net [80.65.225.113])
	by kraid.nerim.net (Postfix) with ESMTP id 33BC040F52
	for <bug-bison@gnu.org>; Tue,  8 Apr 2003 15:31:38 +0200 (CEST)
Received: from adl by localhost with local (Exim 3.36 #1 (Debian))
	id 192tBp-0001RG-00
	for <bug-bison@gnu.org>; Tue, 08 Apr 2003 15:31:05 +0200
Date: Tue, 8 Apr 2003 15:31:05 +0200
To: bug-bison@gnu.org
Message-ID: <20030408133105.GA5525@lrde.epita.fr>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
From: Alexandre Duret-Lutz <duret_g@lrde.epita.fr>
Subject: unsigned int = -1
X-BeenThere: bug-bison@gnu.org
X-Mailman-Version: 2.1b5
Precedence: list
List-Id: Bug reports for Bison, the GNU parser generator <bug-bison.gnu.org>
List-Help: <mailto:bug-bison-request@gnu.org?subject=help>
List-Post: <mailto:bug-bison@gnu.org>
List-Subscribe: <http://mail.gnu.org/mailman/listinfo/bug-bison>,
	<mailto:bug-bison-request@gnu.org?subject=subscribe>
List-Archive: <http://mail.gnu.org/pipermail/bug-bison>
List-Unsubscribe: <http://mail.gnu.org/mailman/listinfo/bug-bison>,
	<mailto:bug-bison-request@gnu.org?subject=unsubscribe>
X-List-Received-Date: Tue, 08 Apr 2003 13:36:03 -0000

Hi people,

I guess this isn't intended.

~/tmp % cat test.yy                                                  15:28 #669
%token FOO
%%
all: FOO
~/tmp % bison --skeleton=lalr1.cc test.yy                            15:28 #670
~/tmp % grep 'unsigned.*-1' test.tab.cc                              15:28 #671
const unsigned char yy::Parser::table_ninf_ = -1;
~/tmp %                                                              15:28 #672

(This is with today's CVS)



From MAILER-DAEMON Fri Apr 11 05:27:48 2003
Received: from list by monty-python.gnu.org with archive (Exim 4.10.13)
	id 193up2-0006It-00
	for mharc-bug-bison@gnu.org; Fri, 11 Apr 2003 05:27:48 -0400
Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.10.13)
	id 193uoW-0005nu-00
	for bug-bison@gnu.org; Fri, 11 Apr 2003 05:27:16 -0400
Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.10.13)
	id 193unR-0004yj-00
	for bug-bison@gnu.org; Fri, 11 Apr 2003 05:26:10 -0400
Received: from tao.natur.cuni.cz ([195.113.56.1])
	by monty-python.gnu.org with esmtp (Exim 4.10.13)
	id 193uay-0000l2-00
	for bug-bison@gnu.org; Fri, 11 Apr 2003 05:13:16 -0400
Received: from tao.natur.cuni.cz (tao.natur.cuni.cz [195.113.56.1])
	by tao.natur.cuni.cz (8.12.9/8.12.8) with ESMTP id h3B9D8UO496035
	for <bug-bison@gnu.org>; Fri, 11 Apr 2003 11:13:08 +0200 (MDT)
X-Obalka-From: mmokrejs@natur.cuni.cz
X-Obalka-To: <bug-bison@gnu.org>
Date: Fri, 11 Apr 2003 11:13:08 +0200 (CEST)
From: =?iso-8859-2?Q?Martin_MOKREJ=A9?= <mmokrejs@natur.cuni.cz>
To: bug-bison@gnu.org
Message-ID: <Pine.OSF.4.51.0304111108550.492032@tao.natur.cuni.cz>
MIME-Version: 1.0
Content-Type: TEXT/PLAIN; charset=iso-8859-2
Content-Transfer-Encoding: quoted-printable
X-MIME-Autoconverted: from 8bit to quoted-printable by tao.natur.cuni.cz id
	h3B9D8UO496035
Subject: ./conftest$ac_exeext from bison-1.875a dumps core
X-BeenThere: bug-bison@gnu.org
X-Mailman-Version: 2.1b5
Precedence: list
List-Id: Bug reports for Bison, the GNU parser generator <bug-bison.gnu.org>
List-Help: <mailto:bug-bison-request@gnu.org?subject=help>
List-Post: <mailto:bug-bison@gnu.org>
List-Subscribe: <http://mail.gnu.org/mailman/listinfo/bug-bison>,
	<mailto:bug-bison-request@gnu.org?subject=subscribe>
List-Archive: <http://mail.gnu.org/pipermail/bug-bison>
List-Unsubscribe: <http://mail.gnu.org/mailman/listinfo/bug-bison>,
	<mailto:bug-bison-request@gnu.org?subject=unsubscribe>
X-List-Received-Date: Fri, 11 Apr 2003 09:27:46 -0000

Hi,
  I think have missed this in config.log output. Could someone tell me wh=
at
really dumps core so I could investigate further? I have Tru64Unix 5.1A, =
cc.
Thanks.

configure:8564: checking whether strerror_r returns char *
configure:8641: cc -o conftest -O2 -arch ev56 -I/software/@sys/usr/includ=
e -I/usr/local/include -I/usr/local/openssl/include
 conftest.c -L/usr/local/lib -L/software/@sys/usr/lib -L/usr/local/openss=
l/lib -L/usr/lib >&5
configure:8644: $? =3D 0
configure:8646: ./conftest
./configure: line 1: 467179 Segmentation fault      (core dumped) ./conft=
est$ac_exeext
configure:8649: $? =3D 139
configure: program exited with status 139
configure: failed program was:
| #line 8621 "configure"
| /* confdefs.h.  */
|
| #define PACKAGE_NAME "GNU Bison"
| #define PACKAGE_TARNAME "bison"
| #define PACKAGE_VERSION "1.875a"
| #define PACKAGE_STRING "GNU Bison 1.875a"
| #define PACKAGE_BUGREPORT "bug-bison@gnu.org"
| #define PACKAGE "bison"
| #define VERSION "1.875a"
| #define _GNU_SOURCE 1
| #define STDC_HEADERS 1
| #define HAVE_SYS_TYPES_H 1
| #define HAVE_SYS_STAT_H 1
| #define HAVE_STDLIB_H 1
| #define HAVE_STRING_H 1
| #define HAVE_MEMORY_H 1
| #define HAVE_STRINGS_H 1
| #define HAVE_INTTYPES_H 1
| #define HAVE_STDINT_H 1
| #define HAVE_UNISTD_H 1
| #define YYTEXT_POINTER 1
| #define M4 "/software/@sys/usr/bin/m4"
| #define STDC_HEADERS 1
| #define HAVE_CTYPE_H 1
| #define HAVE_LOCALE_H 1
| #define HAVE_MEMORY_H 1
| #define HAVE_STDLIB_H 1
| #define HAVE_STRING_H 1
| #define HAVE_UNISTD_H 1
| #define HAVE_UINTPTR_T 1
| #define HAVE_ALLOCA_H 1
| #define HAVE_ALLOCA 1
| #define HAVE_SETLOCALE 1
| #define HAVE_DECL_FREE 1
| #define HAVE_DECL_GETENV 1
| #define HAVE_DECL_GETOPT 1
| #define HAVE_DECL_STPCPY 0
| #define HAVE_DECL_STRCHR 1
| #define HAVE_DECL_STRSPN 1
| #define HAVE_DECL_STRNLEN 0
| #define HAVE_DECL_MALLOC 1
| #define HAVE_DECL_MEMCHR 1
| #define HAVE_DECL_MEMRCHR 0
| #define HAVE_MEMCHR 1
| #define HAVE_STRCHR 1
| #define HAVE_STRRCHR 1
| #define HAVE_STRSPN 1
| #define HAVE_STRTOL 1
| #define HAVE_STRTOUL 1
| #define HAVE_STDLIB_H 1
| #define HAVE_MALLOC 0
| #define malloc rpl_malloc
| #define HAVE_STDLIB_H 1
| #define HAVE_REALLOC 0
| #define realloc rpl_realloc
| #define HAVE_WCHAR_H 1
| #define HAVE_WCTYPE_H 1
| #define HAVE_ISASCII 1
| #define HAVE_ISWCNTRL 1
| #define HAVE_ISWPRINT 1
| #define HAVE_MBSINIT 1
| #define HAVE_WCWIDTH 1
| #define HAVE_MBRTOWC 1
| #define HAVE_DECL_WCWIDTH 1
| #define HAVE_MBSTATE_T 1
| #define HAVE_ISASCII 1
| #define HAVE_ISWPRINT 1
| #define HAVE_MBRTOWC 1
| #define HAVE_LIMITS_H 1
| #define HAVE_STDDEF_H 1
| #define HAVE_STDLIB_H 1
| #define HAVE_STRING_H 1
| #define HAVE_WCHAR_H 1
| #define HAVE_WCTYPE_H 1
| #define STDC_HEADERS 1
| #define HAVE_C_BACKSLASH_A 1
| #define HAVE_MBSTATE_T 1
| #define PROTOTYPES 1
| #define STDC_HEADERS 1
| #define HAVE_STRING_H 1
| #define HAVE_STRCASECMP 1
| #define HAVE_STRNCASECMP 1
| #define HAVE_STRERROR 1
| #define HAVE_VPRINTF 1
| #define HAVE_DECL_STRERROR 1
| #define HAVE_DECL_STRERROR_R 0
| #define HAVE_STRERROR_R 1
| /* end confdefs.h.  */
| #include <stdio.h>
| #if HAVE_SYS_TYPES_H
| # include <sys/types.h>
| #endif
| #if HAVE_SYS_STAT_H
| # include <sys/stat.h>
| #endif
| #if STDC_HEADERS
| # include <stdlib.h>
| # include <stddef.h>
| #else
| # if HAVE_STDLIB_H
| #  include <stdlib.h>
| # endif
| #endif
| #if HAVE_STRING_H
| # if !STDC_HEADERS && HAVE_MEMORY_H
| #  include <memory.h>
| # endif
| # include <string.h>
| #endif
| #if HAVE_STRINGS_H
| # include <strings.h>
| #endif
| #if HAVE_INTTYPES_H
| # include <inttypes.h>
| #else
| # if HAVE_STDINT_H
| #  include <stdint.h>
| # endif
| #endif
| #if HAVE_UNISTD_H
| # include <unistd.h>
| #endif
|       extern char *strerror_r ();
| int
| main ()
| {
| char buf[100];
|         char x =3D *strerror_r (0, buf, sizeof buf);
|         exit (!isalpha (x));
|   ;
|   return 0;
| }
configure:8663: result: no


--=20
Martin Mokrejs <mmokrejs@natur.cuni.cz>, <m.mokrejs@gsf.de>
PGP5.0i key is at http://www.natur.cuni.cz/~mmokrejs
MIPS / Institute for Bioinformatics <http://mips.gsf.de>
GSF - National Research Center for Environment and Health
Ingolstaedter Landstrasse 1, D-85764 Neuherberg, Germany
tel.: +49-89-3187 3683 , fax:=A0+49-89-3187 3585



From MAILER-DAEMON Fri Apr 11 05:45:13 2003
Received: from list by monty-python.gnu.org with archive (Exim 4.10.13)
	id 193v5S-0006et-00
	for mharc-bug-bison@gnu.org; Fri, 11 Apr 2003 05:44:46 -0400
Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.10.13)
	id 193v4o-0004h3-00
	for bug-bison@gnu.org; Fri, 11 Apr 2003 05:44:06 -0400
Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.10.13)
	id 193v4d-00046j-00
	for bug-bison@gnu.org; Fri, 11 Apr 2003 05:43:57 -0400
Received: from tao.natur.cuni.cz ([195.113.56.1])
	by monty-python.gnu.org with esmtp (Exim 4.10.13)
	id 193v4F-0003hc-00
	for bug-bison@gnu.org; Fri, 11 Apr 2003 05:43:31 -0400
Received: from tao.natur.cuni.cz (tao.natur.cuni.cz [195.113.56.1])
	by tao.natur.cuni.cz (8.12.9/8.12.8) with ESMTP id h3B9hUUO506463
	for <bug-bison@gnu.org>; Fri, 11 Apr 2003 11:43:30 +0200 (MDT)
X-Obalka-From: mmokrejs@natur.cuni.cz
X-Obalka-To: <bug-bison@gnu.org>
Date: Fri, 11 Apr 2003 11:43:30 +0200 (CEST)
From: =?iso-8859-2?Q?Martin_MOKREJ=A9?= <mmokrejs@natur.cuni.cz>
To: bug-bison@gnu.org
In-Reply-To: <Pine.OSF.4.51.0304111108550.492032@tao.natur.cuni.cz>
Message-ID: <Pine.OSF.4.51.0304111131001.495743@tao.natur.cuni.cz>
References: <Pine.OSF.4.51.0304111108550.492032@tao.natur.cuni.cz>
MIME-Version: 1.0
Content-Type: TEXT/PLAIN; charset=iso-8859-2
Content-Transfer-Encoding: quoted-printable
X-MIME-Autoconverted: from 8bit to quoted-printable by tao.natur.cuni.cz id
	h3B9hUUO506463
Subject: Cannot configure current cvs checkout
X-BeenThere: bug-bison@gnu.org
X-Mailman-Version: 2.1b5
Precedence: list
List-Id: Bug reports for Bison, the GNU parser generator <bug-bison.gnu.org>
List-Help: <mailto:bug-bison-request@gnu.org?subject=help>
List-Post: <mailto:bug-bison@gnu.org>
List-Subscribe: <http://mail.gnu.org/mailman/listinfo/bug-bison>,
	<mailto:bug-bison-request@gnu.org?subject=subscribe>
List-Archive: <http://mail.gnu.org/pipermail/bug-bison>
List-Unsubscribe: <http://mail.gnu.org/mailman/listinfo/bug-bison>,
	<mailto:bug-bison-request@gnu.org?subject=unsubscribe>
X-List-Received-Date: Fri, 11 Apr 2003 09:44:44 -0000

Hi,
  I get the following on Tru64Unix 5.1A:

$ ./configure --prefix=3D/software/@sys/usr
checking for a BSD-compatible install... /software/@sys/usr/bin/install -=
c
checking whether build environment is sane... yes
/afs/gsf.de/sources/ev56/bison/config/missing: /afs/gsf.de/sources/ev56/b=
ison/config/missing: No such file or directory
configure: WARNING: `missing' script is too old or missing
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking for gcc... cc
checking for C compiler default output... a.out
checking whether the C compiler works... yes
checking whether we are cross compiling... no
checking for suffix of executables...
checking for suffix of object files... o
checking whether we are using the GNU C compiler... no
checking whether cc accepts -g... yes
checking for cc option to accept ANSI C... none needed
checking for style of include used by make... GNU
checking dependency style of cc... tru64
checking for strerror in -lcposix... no
checking how to run the C preprocessor... cc -E
checking for egrep... grep -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking minix/config.h usability... no
checking minix/config.h presence... no
checking for minix/config.h... no
checking for gcc... (cached) cc
checking whether we are using the GNU C compiler... (cached) no
checking whether cc accepts -g... (cached) yes
checking for cc option to accept ANSI C... (cached) none needed
checking dependency style of cc... (cached) tru64
./configure: line 4182: syntax error near unexpected token `BISON_WARNING=
(-Werror)'
./configure: line 4182: `  BISON_WARNING(-Werror)'
$


--=20
Martin Mokrejs <mmokrejs@natur.cuni.cz>, <m.mokrejs@gsf.de>
PGP5.0i key is at http://www.natur.cuni.cz/~mmokrejs
MIPS / Institute for Bioinformatics <http://mips.gsf.de>
GSF - National Research Center for Environment and Health
Ingolstaedter Landstrasse 1, D-85764 Neuherberg, Germany
tel.: +49-89-3187 3683 , fax:=A0+49-89-3187 3585



From MAILER-DAEMON Fri Apr 11 06:23:07 2003
Received: from list by monty-python.gnu.org with archive (Exim 4.10.13)
	id 193veN-0008Bi-00
	for mharc-bug-bison@gnu.org; Fri, 11 Apr 2003 06:20:51 -0400
Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.10.13)
	id 193vdy-0007wN-00
	for bug-bison@gnu.org; Fri, 11 Apr 2003 06:20:26 -0400
Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.10.13)
	id 193vdV-0007Zc-00
	for bug-bison@gnu.org; Fri, 11 Apr 2003 06:19:58 -0400
Received: from tao.natur.cuni.cz ([195.113.56.1])
	by monty-python.gnu.org with esmtp (Exim 4.10.13)
	id 193vRX-0002iW-00
	for bug-bison@gnu.org; Fri, 11 Apr 2003 06:07:35 -0400
Received: from tao.natur.cuni.cz (tao.natur.cuni.cz [195.113.56.1])
	by tao.natur.cuni.cz (8.12.9/8.12.8) with ESMTP id h3BA7YUO511161
	for <bug-bison@gnu.org>; Fri, 11 Apr 2003 12:07:34 +0200 (MDT)
X-Obalka-From: mmokrejs@natur.cuni.cz
X-Obalka-To: <bug-bison@gnu.org>
Date: Fri, 11 Apr 2003 12:07:34 +0200 (CEST)
From: =?iso-8859-2?Q?Martin_MOKREJ=A9?= <mmokrejs@natur.cuni.cz>
To: bug-bison@gnu.org
In-Reply-To: <Pine.OSF.4.51.0304111131001.495743@tao.natur.cuni.cz>
Message-ID: <Pine.OSF.4.51.0304111206010.503970@tao.natur.cuni.cz>
References: <Pine.OSF.4.51.0304111108550.492032@tao.natur.cuni.cz>
 <Pine.OSF.4.51.0304111131001.495743@tao.natur.cuni.cz>
MIME-Version: 1.0
Content-Type: TEXT/PLAIN; charset=iso-8859-2
Content-Transfer-Encoding: quoted-printable
X-MIME-Autoconverted: from 8bit to quoted-printable by tao.natur.cuni.cz id
	h3BA7YUO511161
Subject: Re: Cannot configure current cvs checkout
X-BeenThere: bug-bison@gnu.org
X-Mailman-Version: 2.1b5
Precedence: list
List-Id: Bug reports for Bison, the GNU parser generator <bug-bison.gnu.org>
List-Help: <mailto:bug-bison-request@gnu.org?subject=help>
List-Post: <mailto:bug-bison@gnu.org>
List-Subscribe: <http://mail.gnu.org/mailman/listinfo/bug-bison>,
	<mailto:bug-bison-request@gnu.org?subject=subscribe>
List-Archive: <http://mail.gnu.org/pipermail/bug-bison>
List-Unsubscribe: <http://mail.gnu.org/mailman/listinfo/bug-bison>,
	<mailto:bug-bison-request@gnu.org?subject=unsubscribe>
X-List-Received-Date: Fri, 11 Apr 2003 10:20:50 -0000

On Fri, 11 Apr 2003, Martin MOKREJ=A9 wrote:

Hi,
  actually, I cannot even bootstrap current sources:

$ ./bootstrap
Bootstrapping CVS Bison...
running: autoreconf --verbose --install --force
autoreconf: Entering directory `.'
autoreconf: running: autopoint --force
cvs checkout: cannot find module `archive' - ignored
find: archive: No such file or directory
find: archive: No such file or directory
autopoint: *** infrastructure files for version 0.11.5 not found; this is=
 autopoint from GNU gettext-tools 0.12-pre3
autopoint: *** Stop.
autoreconf: autopoint failed with exit status: 1
$ autopoint
cvs checkout: cannot find module `archive' - ignored
find: archive: No such file or directory
find: archive: No such file or directory
autopoint: *** infrastructure files for version 0.11.5 not found; this is=
 autopoint from GNU gettext-tools 0.12-pre3
autopoint: *** Stop.
$ autopoint --verbose
autopoint: unknown option --verbose
Try 'autopoint --help' for more information.
$ autopoint --version
/usr/local/bin/autopoint (GNU gettext-tools) 0.12-pre3
Copyright (C) 2002 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is N=
O
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOS=
E.
Written by Bruno Haible
$


I've just reinstalled gettext from cvs to be sure it is installed properl=
y.
Anyone has a clue if the problem is with bison or with gettext?
TIA


> Hi,
>   I get the following on Tru64Unix 5.1A:
>
> $ ./configure --prefix=3D/software/@sys/usr
> checking for a BSD-compatible install... /software/@sys/usr/bin/install=
 -c
> checking whether build environment is sane... yes
> /afs/gsf.de/sources/ev56/bison/config/missing: /afs/gsf.de/sources/ev56=
/bison/config/missing: No such file or directory
> configure: WARNING: `missing' script is too old or missing
> checking for gawk... gawk
> checking whether make sets $(MAKE)... yes
> checking for gcc... cc
> checking for C compiler default output... a.out
> checking whether the C compiler works... yes
> checking whether we are cross compiling... no
> checking for suffix of executables...
> checking for suffix of object files... o
> checking whether we are using the GNU C compiler... no
> checking whether cc accepts -g... yes
> checking for cc option to accept ANSI C... none needed
> checking for style of include used by make... GNU
> checking dependency style of cc... tru64
> checking for strerror in -lcposix... no
> checking how to run the C preprocessor... cc -E
> checking for egrep... grep -E
> checking for ANSI C header files... yes
> checking for sys/types.h... yes
> checking for sys/stat.h... yes
> checking for stdlib.h... yes
> checking for string.h... yes
> checking for memory.h... yes
> checking for strings.h... yes
> checking for inttypes.h... yes
> checking for stdint.h... yes
> checking for unistd.h... yes
> checking minix/config.h usability... no
> checking minix/config.h presence... no
> checking for minix/config.h... no
> checking for gcc... (cached) cc
> checking whether we are using the GNU C compiler... (cached) no
> checking whether cc accepts -g... (cached) yes
> checking for cc option to accept ANSI C... (cached) none needed
> checking dependency style of cc... (cached) tru64
> ./configure: line 4182: syntax error near unexpected token `BISON_WARNI=
NG(-Werror)'
> ./configure: line 4182: `  BISON_WARNING(-Werror)'
> $
>
>
>

--=20
Martin Mokrejs <mmokrejs@natur.cuni.cz>, <m.mokrejs@gsf.de>
PGP5.0i key is at http://www.natur.cuni.cz/~mmokrejs
MIPS / Institute for Bioinformatics <http://mips.gsf.de>
GSF - National Research Center for Environment and Health
Ingolstaedter Landstrasse 1, D-85764 Neuherberg, Germany
tel.: +49-89-3187 3683 , fax:=A0+49-89-3187 3585



From MAILER-DAEMON Fri Apr 11 07:30:05 2003
Received: from list by monty-python.gnu.org with archive (Exim 4.10.13)
	id 193whd-0007C4-00
	for mharc-bug-bison@gnu.org; Fri, 11 Apr 2003 07:28:17 -0400
Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.10.13)
	id 193wgj-0006oj-00
	for bug-bison@gnu.org; Fri, 11 Apr 2003 07:27:21 -0400
Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.10.13)
	id 193wWU-0002sV-00
	for bug-bison@gnu.org; Fri, 11 Apr 2003 07:16:46 -0400
Received: from tao.natur.cuni.cz ([195.113.56.1])
	by monty-python.gnu.org with esmtp (Exim 4.10.13)
	id 193wKa-00012U-00
	for bug-bison@gnu.org; Fri, 11 Apr 2003 07:04:28 -0400
Received: from tao.natur.cuni.cz (tao.natur.cuni.cz [195.113.56.1])
	by tao.natur.cuni.cz (8.12.9/8.12.8) with ESMTP id h3BB4RUO519015
	for <bug-bison@gnu.org>; Fri, 11 Apr 2003 13:04:27 +0200 (MDT)
X-Obalka-From: mmokrejs@natur.cuni.cz
X-Obalka-To: <bug-bison@gnu.org>
Date: Fri, 11 Apr 2003 13:04:27 +0200 (CEST)
From: =?iso-8859-2?Q?Martin_MOKREJ=A9?= <mmokrejs@natur.cuni.cz>
To: bug-bison@gnu.org
In-Reply-To: <Pine.OSF.4.51.0304111206010.503970@tao.natur.cuni.cz>
Message-ID: <Pine.OSF.4.51.0304111232540.512136@tao.natur.cuni.cz>
References: <Pine.OSF.4.51.0304111108550.492032@tao.natur.cuni.cz>
 <Pine.OSF.4.51.0304111131001.495743@tao.natur.cuni.cz>
 <Pine.OSF.4.51.0304111206010.503970@tao.natur.cuni.cz>
MIME-Version: 1.0
Content-Type: TEXT/PLAIN; charset=iso-8859-2
Content-Transfer-Encoding: quoted-printable
X-MIME-Autoconverted: from 8bit to quoted-printable by tao.natur.cuni.cz id
	h3BB4RUO519015
Subject: Re: Cannot configure current cvs checkout
X-BeenThere: bug-bison@gnu.org
X-Mailman-Version: 2.1b5
Precedence: list
List-Id: Bug reports for Bison, the GNU parser generator <bug-bison.gnu.org>
List-Help: <mailto:bug-bison-request@gnu.org?subject=help>
List-Post: <mailto:bug-bison@gnu.org>
List-Subscribe: <http://mail.gnu.org/mailman/listinfo/bug-bison>,
	<mailto:bug-bison-request@gnu.org?subject=subscribe>
List-Archive: <http://mail.gnu.org/pipermail/bug-bison>
List-Unsubscribe: <http://mail.gnu.org/mailman/listinfo/bug-bison>,
	<mailto:bug-bison-request@gnu.org?subject=unsubscribe>
X-List-Received-Date: Fri, 11 Apr 2003 11:28:15 -0000

On Fri, 11 Apr 2003, Martin MOKREJ=A9 wrote:

> On Fri, 11 Apr 2003, Martin MOKREJ=A9 wrote:
>
> Hi,
>   actually, I cannot even bootstrap current sources:
>
> $ ./bootstrap
> Bootstrapping CVS Bison...
> running: autoreconf --verbose --install --force
> autoreconf: Entering directory `.'
> autoreconf: running: autopoint --force
> cvs checkout: cannot find module `archive' - ignored
> find: archive: No such file or directory
> find: archive: No such file or directory
> autopoint: *** infrastructure files for version 0.11.5 not found; this =
is autopoint from GNU gettext-tools 0.12-pre3
> autopoint: *** Stop.
> autoreconf: autopoint failed with exit status: 1

OK, downgrade to 0.11.5 helped.

Then, I could successfully bootstrap. During the compilation I see:

On Fri, 11 Apr 2003, Martin MOKREJ=A9 wrote:

> On Fri, 11 Apr 2003, Martin MOKREJ=A9 wrote:
>
> Hi,
>   actually, I cannot even bootstrap current sources:
>
> $ ./bootstrap
> Bootstrapping CVS Bison...
> running: autoreconf --verbose --install --force
> autoreconf: Entering directory `.'
> autoreconf: running: autopoint --force
> cvs checkout: cannot find module `archive' - ignored
> find: archive: No such file or directory
> find: archive: No such file or directory
> autopoint: *** infrastructure files for version 0.11.5 not found; this =
is autopoint from GNU gettext-tools 0.12-pre3
> autopoint: *** Stop.
> autoreconf: autopoint failed with exit status: 1

OK, downgrade to 0.11.5 helped.

Then, I could successfully bootstrap. During the compilation I see:


make[3]: Entering directory `/afs/gsf.de/sources/ev56/bison/po'
sed -e '/^#/d' remove-potcdate.sin > t-remove-potcdate.sed
mv t-remove-potcdate.sed remove-potcdate.sed
/usr/local/bin/xgettext --default-domain=3Dbison --directory=3D.. \
  --add-comments=3DTRANSLATORS: --keyword=3D_ --keyword=3DN_ \
  --files-from=3D./POTFILES.in \
  --copyright-holder=3D'Free Software Foundation, Inc.'
/usr/local/bin/xgettext: warning: file `src/parse-gram.y' extension `y' i=
s unknown; will try C
/usr/local/bin/xgettext: warning: file `src/scan-gram.l' extension `l' is=
 unknown; will try C
test ! -f bison.po || { \
  if test -f ./bison.pot; then \
    sed -f remove-potcdate.sed < ./bison.pot > bison.1po && \
    sed -f remove-potcdate.sed < bison.po > bison.2po && \
    if cmp bison.1po bison.2po >/dev/null 2>&1; then \
      rm -f bison.1po bison.2po bison.po; \
    else \
      rm -f bison.1po bison.2po ./bison.pot && \
      mv bison.po ./bison.pot; \
    fi; \
  else \
    mv bison.po ./bison.pot; \
  fi; \
}
make[3]: Leaving directory `/afs/gsf.de/sources/ev56/bison/po'



source=3D'abitset.c' object=3D'abitset.o' libtool=3Dno \
depfile=3D'.deps/abitset.Po' tmpdepfile=3D'.deps/abitset.TPo' \
depmode=3Dtru64 /bin/bash ../config/depcomp \
cc -DHAVE_CONFIG_H -I. -I. -I.. -I.. -I../src -I../lib  -I/software/@sys/=
usr/include -I/usr/local/include -I/usr/local/openssl/include  -O2 -arch =
ev56 -c `test -f 'abitset.c' || echo './'`abitset.c
source=3D'bitset.c' object=3D'bitset.o' libtool=3Dno \
depfile=3D'.deps/bitset.Po' tmpdepfile=3D'.deps/bitset.TPo' \
depmode=3Dtru64 /bin/bash ../config/depcomp \
cc -DHAVE_CONFIG_H -I. -I. -I.. -I.. -I../src -I../lib  -I/software/@sys/=
usr/include -I/usr/local/include -I/usr/local/openssl/include  -O2 -arch =
ev56 -c `test -f 'bitset.c' || echo './'`bitset.c
cc: Warning: bitset.c, line 149: In this statement, the referenced type o=
f the pointer value "((((bobstack))->temp=3D((bytes)),((((bobstack))->chu=
nk_limit-((bobstack))->next_free<((bobstack))->temp)?(_obstack_newchunk(.=
..),0):0),(((bobstack))->next_free+=3D((bobstack))->temp)),((((bobstack))=
->next_free=3D=3D((bobstack))->object_base?((((bobstack))->maybe_empty_ob=
ject=3D1),0):0),((bobstack))->temp=3D((((bobstack))->object_base)-(char .=
..)0),((bobstack))->next_free=3D(((((((bobstack))->next_free)-(char ...)0=
)+((bobstack))->alignment_mask)&~(((bobstack))->alignment_mask))+(char ..=
.)0),((((bobstack))->next_free-(char ...)((bobstack))->chunk>((bobstack))=
->chunk_limit-(char ...)((bobstack))->chunk)?(((bobstack))->next_free=3D(=
(bobstack))->chunk_limit):0),((bobstack))->object_base=3D((bobstack))->ne=
xt_free,((((bobstack))->temp)+(char ...)0)))" is "char", which is not com=
patible with "union bitset_union". (ptrmismatch)
  bset =3D obstack_alloc (bobstack, bytes);
--^


cc -DHAVE_CONFIG_H -I. -I. -I.. -I.. -I../src -I../lib  -I/software/@sys/=
usr/include -I/usr/local/include -I/usr/local/openssl/include  -O2 -arch =
ev56 -c `test -f 'realloc.c' || echo './'`realloc.c
rm -f libbison.a
ar cru libbison.a argmatch.o basename.o dirname.o get-errno.o getopt.o ge=
topt1.o hash.o mbswidth.o quote.o quotearg.o subpipe.o xmalloc.o xstrdup.=
o xstrndup.o abitset.o bitset.o ebitset.o bitsetv.o bitset_stats.o lbitse=
t.o bitsetv-print.o timevar.o error.o error.o memrchr.o stpcpy.o strnlen.=
o obstack.o malloc.o realloc.o
ar: Warning: ignoring second definition of error defined in archive
ar: Warning: ignoring second definition of error_at_line defined in archi=
ve
ranlib libbison.a
ar: Warning: ignoring second definition of error defined in archive
ar: Warning: ignoring second definition of error_at_line defined in archi=
ve
make[2]: Leaving directory `/afs/gsf.de/sources/ev56/bison/lib'


Should I worry about that? BTW: All test succeeded! That means, that
there're no longer problem with bison compiled with -O2 cflag on Tru64Uni=
x 5.1A!
And I did not have to change the compiler even ... ;)
--=20
Martin Mokrejs <mmokrejs@natur.cuni.cz>, <m.mokrejs@gsf.de>
PGP5.0i key is at http://www.natur.cuni.cz/~mmokrejs
MIPS / Institute for Bioinformatics <http://mips.gsf.de>
GSF - National Research Center for Environment and Health
Ingolstaedter Landstrasse 1, D-85764 Neuherberg, Germany
tel.: +49-89-3187 3683 , fax:=A0+49-89-3187 3585



From MAILER-DAEMON Sun Apr 13 07:20:32 2003
Received: from list by monty-python.gnu.org with archive (Exim 4.10.13)
	id 194fX6-0005Qw-00
	for mharc-bug-bison@gnu.org; Sun, 13 Apr 2003 07:20:24 -0400
Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.10.13)
	id 194fWL-000570-00
	for bug-bison@gnu.org; Sun, 13 Apr 2003 07:19:37 -0400
Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.10.13)
	id 194fRJ-0003VK-00
	for bug-bison@gnu.org; Sun, 13 Apr 2003 07:14:25 -0400
Received: from pd9ed7e3e.dip.t-dialin.net ([217.237.126.62] helo=mail.com)
	by monty-python.gnu.org with smtp (Exim 4.10.13)
	id 194fOF-0002Ka-00
	for bug-bison@gnu.org; Sun, 13 Apr 2003 07:11:15 -0400
From: <vberinger@lycos.de>
To: bug-bison<bug-bison@gnu.org>
X-Priority: 3
X-MSMail-Priority: Normal
X-Mailer: Microsoft Outlook Express 6.00.2600.0000
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2600.0000
Mime-Version: 1.0
Content-Type: text/plain; charset="Windows-1250"
Date: Sun, 13 Apr 2003 13:11:08 +0200
Message-Id: <E194fOF-0002Ka-00@monty-python.gnu.org>
Subject: Sie haben Allergien, Interesse an Heilung ?
X-BeenThere: bug-bison@gnu.org
X-Mailman-Version: 2.1b5
Precedence: list
Reply-To: vberinger@lycos.de
List-Id: Bug reports for Bison, the GNU parser generator <bug-bison.gnu.org>
List-Help: <mailto:bug-bison-request@gnu.org?subject=help>
List-Post: <mailto:bug-bison@gnu.org>
List-Subscribe: <http://mail.gnu.org/mailman/listinfo/bug-bison>,
	<mailto:bug-bison-request@gnu.org?subject=subscribe>
List-Archive: <http://mail.gnu.org/pipermail/bug-bison>
List-Unsubscribe: <http://mail.gnu.org/mailman/listinfo/bug-bison>,
	<mailto:bug-bison-request@gnu.org?subject=unsubscribe>
X-List-Received-Date: Sun, 13 Apr 2003 11:20:22 -0000

Hallo an alle.
Ich habe eine neue Heilungsmetode fuer Allergiker erfunden.
Wirkung 100%.
Ich behandle Sie.
Oder ich Verkaufe ihnen das Geheimniss, und Sie behandlen.

Wenn Sie Interesse haben melden Sie sich bei mir.

http://www.antiallergy.net/

Gruesse euch



From MAILER-DAEMON Mon Apr 14 09:21:39 2003
Received: from list by monty-python.gnu.org with archive (Exim 4.10.13)
	id 1953tq-00013Q-00
	for mharc-bug-bison@gnu.org; Mon, 14 Apr 2003 09:21:30 -0400
Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.10.13)
	id 1953tI-0000jO-00
	for bug-bison@gnu.org; Mon, 14 Apr 2003 09:20:56 -0400
Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.10.13)
	id 1953t5-0000Cz-00
	for bug-bison@gnu.org; Mon, 14 Apr 2003 09:20:46 -0400
Received: from dialup-209.246.74.2.dial1.newyork1.level3.net ([209.246.74.2])
	by monty-python.gnu.org with esmtp (Exim 4.10.13)
	id 1953sh-0007sv-00
	for bug-bison@gnu.org; Mon, 14 Apr 2003 09:20:20 -0400
From: "Stephen Sunderland" <sps@igdnycg.com>
To: <bug-bison@gnu.org>
Sender: "Stephen Sunderland" <sps@igdnycg.com>
Mime-Version: 1.0
Content-Type: multipart/alternative;
	boundary="= Multipart Boundary 0411032119"
Date: Fri, 11 Apr 2003 21:19:05 -0400
Message-Id: <E1953sh-0007sv-00@monty-python.gnu.org>
Subject: April 2003: Manhattan Office Space Update
X-BeenThere: bug-bison@gnu.org
X-Mailman-Version: 2.1b5
Precedence: list
List-Id: Bug reports for Bison, the GNU parser generator <bug-bison.gnu.org>
List-Help: <mailto:bug-bison-request@gnu.org?subject=help>
List-Post: <mailto:bug-bison@gnu.org>
List-Subscribe: <http://mail.gnu.org/mailman/listinfo/bug-bison>,
	<mailto:bug-bison-request@gnu.org?subject=subscribe>
List-Archive: <http://mail.gnu.org/pipermail/bug-bison>
List-Unsubscribe: <http://mail.gnu.org/mailman/listinfo/bug-bison>,
	<mailto:bug-bison-request@gnu.org?subject=unsubscribe>
X-List-Received-Date: Mon, 14 Apr 2003 13:21:28 -0000

This is a multipart MIME message.

--= Multipart Boundary 0411032119
Content-Type: text/plain;
	charset="ISO-8859-1"
Content-Transfer-Encoding: 8bit

Are you interested in learning about the commercial real estate market in
Manhattan?

If yes, click here to join our free newsletter or  to remove yourself. 

With real estate bargains extending to a greater number of buildings, now
is an excellent time to renegotiate your lease, extend your term or
relocate. Landlords are very anxious to move space as the commercial real
estate remains quiet, over concerns of a prolonged conflict in Iraq and a
weak economy. 

To read the full article click here. 


Free lecture - 
Topic: Amazing Deals: Where & How To Find Them
Location: North Fork Bank, 120 West 23rd Street (between Sixth and Seventh
Avenues)
Date: Wednesday, April 16th, 2003
Time: 8:00AM - 9:30AM

Please email or call (212) 258-2700 to attend. 


Many thanks,

Stephen Sunderland
Managing Director
IGDNYC Inc.



If you want to subscribe someone to our newsletters, please Click Here

 To unsubscribe bug-bison@gnu.orgfrom subsequent newsletters,  


200 West 57th Street, Suite 305, New York, NY 10019-3211      Tel:
212.258.2700      Fax: 212.258.3286      info@igdnycg.com 


Home   |   Why Us?   |   Our Clients   |   Useful Information   |   Forms  
|   News   |   Testimonials   |   Contact Us

--= Multipart Boundary 0411032119
Content-Type: text/html;
	charset="ISO-8859-1"
Content-Transfer-Encoding: 8bit

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD><TITLE>April 2003: Manhattan Office Space Update</TITLE>
<META http-equiv=Content-Type content="text/html; charset=iso-8859-1">
<SCRIPT language=JavaScript>

        function doSubmit(where) {
                document.SendNewsletter.action = where;
                document.SendNewsletter.submit();
        }

</SCRIPT>

<META content="MSHTML 6.00.2800.1141" name=GENERATOR></HEAD>
<BODY bgColor=#ffffff>
<CENTER>
<TABLE borderColor=#000040 cellSpacing=0 cellPadding=0 width=754
bgColor=#0065a8 
border=0 VALIGN="TOP">
  <TBODY>
  <TR>
    <TD>&nbsp; </TD></TR></TBODY></TABLE><BR>
<TABLE cellSpacing=0 cellPadding=0 width=754 bgColor=#ffffff border=0>
  <TBODY>
  <TR></TR></TBODY></TABLE>
<TABLE cellSpacing=0 cellPadding=0 width=754 bgColor=#ffffff border=0>
  <TBODY>
  <TR>
    <TD vAlign=bottom align=right><A 
      onmouseover="window.status='Home'; return true;" 
      onmouseout="window.status=''; return true;" 
      href="http://www.igdnycg.com/Main.html"><IMG alt="IGDNYC Inc." 
      src="http://www.igdnycg.com/Images/Header1.gif" border=0></A> </TD>
    <TD vAlign=bottom align=left><IMG 
      src="http://www.igdnycg.com/Images/Header2.gif" border=0> 
</TD></TR></TBODY></TABLE>
<TABLE>
  <TBODY>
  <TR>
    <FORM name=SendNewsletter
action=http://www.igdnycg.com/cgi-bin/Remove.cgi 
    method=post></TR></TBODY></TABLE>
<TABLE borderColor=#000040 cellSpacing=0 cellPadding=10 width=754 
bgColor=#ffffff border=1 BORDERWIDTH="1">
  <TBODY>
  <TR>
    <TD align=left>
      <P><BR><FONT face="Verdana, Arial" color=#000080 size=2><BR><FONT 
      face="Verdana, Arial" color=#000080 size=2>Are you interested in
learning 
      about the commercial real estate market in Manhattan?<BR><BR>If yes,
<A 
      href="http://www.igdnycf.com/Add.shtml"><FONT face=Verdana color=blue 
      size=2><U>click here</U></FONT></A> to join our free newsletter or
<INPUT type=submit value="Click Here"> to remove yourself. <BR><BR><I>With 
      real estate bargains extending to a greater number of buildings, now
is an 
      excellent time to renegotiate your lease, extend your term or
relocate. 
      Landlords are very anxious to move space as the commercial real
estate 
      remains quiet, over concerns of a prolonged conflict in Iraq and a
weak 
      economy.</I> <BR><BR><B>To read the full article <A 
      href="http://www.igdnycg.com/Reports_April03.shtml"><FONT
face=Verdana 
      color=blue size=2><U>click here</U></FONT></A>.</B> <BR><BR><BR>
      <TABLE cellPadding=10 width=600 align=center bgColor=#c0c0c0 border=1>
        <TBODY>
        <TR>
          <TD align=left><FONT face=Verdana color=red size=2><U><B>Free 
            lecture -</U></B></FONT> <FONT face="Verdana, Arial"
color=#000080 
            size=2>
            <UL><U>Topic</U>: <B>Amazing Deals: Where &amp; How To Find 
              Them</B><BR><U>Location</U>: North Fork Bank, 120 West 23rd
Street 
              (between Sixth and Seventh Avenues)<BR><U>Date</U>:
Wednesday, 
              April 16th, 2003<BR><U>Time</U>: 8:00AM -
9:30AM<BR><BR>Please <A 
              href="mailto:sps@igdnycg.com"><FONT face=Verdana color=blue 
              size=2><U>email</U></FONT></A> or call (212) 258-2700 to
attend. 
            </UL></FONT></TD></TR></TBODY></TABLE>
      <CENTER></CENTER><BR>Many thanks,<BR><BR><FONT face="Verdana, Arial" 
      color=#000080 size=2>Stephen Sunderland<BR>Managing
Director<BR>IGDNYC 
      Inc.</B><BR><BR><BR><BR>If you want to subscribe someone to our 
      newsletters, please <A href="http://www.igdnycg.com/Add.shtml"><FONT 
      face=Verdana color=blue size=2><U>Click 
      Here</U></A></FONT><BR><BR></FONT><INPUT type=hidden
value=bug-bison@gnu.org 
      name=Email> <FONT face="Verdana, Arial, Helvetica, Sans-Serif" 
      color=#000000 size=2>To unsubscribe <I>bug-bison@gnu.org</I>from
subsequent 
      newsletters, <INPUT type=submit value="Click Here"></FONT>
</FONT></FONT>
      <P></P></TD></TR></TBODY></TABLE></FORM>
<TABLE>
  <TBODY>
  <TR></TR></TBODY></TABLE>
<TABLE cellSpacing=0 cellPadding=0 width=754 bgColor=#ffffff border=0>
  <TBODY>
  <TR>
    <TD align=middle colSpan=2><FONT face="Arial, Helvetica, Sans-Serif" 
      color=#000080 size=2>200 West 57th Street, Suite 305, New York, NY 
      10019-3211 &nbsp;&nbsp;&nbsp;&nbsp; Tel: 212.258.2700 
      &nbsp;&nbsp;&nbsp;&nbsp; Fax: 212.258.3286 &nbsp;&nbsp;&nbsp;&nbsp;
<A 
      href="mailto:info@igdnycg.com"><FONT face="Arial, Helvetica,
Sans-Serif" 
      color=#000800 size=2><B>info@igdnycg.com</B></A>
<BR></FONT></FONT></TD></TR>
  <TR>
    <TD align=middle colSpan=2><FONT face="Arial, Helvetica, Sans-Serif" 
      color=#0065a8 size=2><BR><A
href="http://www.igdnycg.com/Main.html"><FONT 
      face="Arial, Helvetica, Sans-Serif" color=#0065a8 size=2>Home</A> 
      &nbsp;&nbsp;|&nbsp;&nbsp; <A href="AboutUs.shtml"><FONT 
      face="Arial, Helvetica, Sans-Serif" color=#0065a8 size=2>Why Us?</A> 
      &nbsp;&nbsp;|&nbsp;&nbsp; <A href="OurClients.shtml"><FONT 
      face="Arial, Helvetica, Sans-Serif" color=#0065a8 size=2>Our
Clients</A> 
      &nbsp;&nbsp;|&nbsp;&nbsp; <A href="UsefulInfo.shtml"><FONT 
      face="Arial, Helvetica, Sans-Serif" color=#0065a8 size=2>Useful 
      Information</A> &nbsp;&nbsp;|&nbsp;&nbsp; <A href="Forms.shtml"><FONT 
      face="Arial, Helvetica, Sans-Serif" color=#0065a8 size=2>Forms</A> 
      &nbsp;&nbsp;|&nbsp;&nbsp; <A href="News.shtml"><FONT 
      face="Arial, Helvetica, Sans-Serif" color=#0065a8 size=2>News</A> 
      &nbsp;&nbsp;|&nbsp;&nbsp; <A href="Testimonials.shtml"><FONT 
      face="Arial, Helvetica, Sans-Serif" color=#0065a8
size=2>Testimonials</A> 
      &nbsp;&nbsp;|&nbsp;&nbsp; <A href="ContactUs.shtml"><FONT
color=#0065a8 
      size=2 CE="Arial, Helvetica, Sans-Serif" FA!>Contact Us</A> <BR><IMG 
      src="http://www.igdnycg.com/Images/Spacer.gif" border=0> 
     
</FONT></FONT></FONT></FONT></FONT></FONT></FONT></FONT></FONT></TD></TR></T
BODY></TABLE></TR></CENTER></BODY></HTML>

--= Multipart Boundary 0411032119--




From MAILER-DAEMON Mon Apr 14 10:38:34 2003
Received: from list by monty-python.gnu.org with archive (Exim 4.10.13)
	id 195567-0002cb-00
	for mharc-bug-bison@gnu.org; Mon, 14 Apr 2003 10:38:15 -0400
Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.10.13)
	id 195563-0002W4-00
	for bug-bison@gnu.org; Mon, 14 Apr 2003 10:38:11 -0400
Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.10.13)
	id 19555i-0001Nb-00
	for bug-bison@gnu.org; Mon, 14 Apr 2003 10:38:00 -0400
Received: from tao.natur.cuni.cz ([195.113.56.1])
	by monty-python.gnu.org with esmtp (Exim 4.10.13)
	id 19555Z-0000he-00
	for bug-bison@gnu.org; Mon, 14 Apr 2003 10:37:41 -0400
Received: from tao.natur.cuni.cz (tao.natur.cuni.cz [195.113.56.1])
	by tao.natur.cuni.cz (8.12.9/8.12.8) with ESMTP id h3EEbdDT112026
	for <bug-bison@gnu.org>; Mon, 14 Apr 2003 16:37:39 +0200 (MDT)
X-Obalka-From: mmokrejs@natur.cuni.cz
X-Obalka-To: <bug-bison@gnu.org>
Date: Mon, 14 Apr 2003 16:37:39 +0200 (CEST)
From: =?iso-8859-2?Q?Martin_MOKREJ=A9?= <mmokrejs@natur.cuni.cz>
To: bug-bison@gnu.org
Message-ID: <Pine.OSF.4.51.0304141631120.370497@tao.natur.cuni.cz>
MIME-Version: 1.0
Content-Type: TEXT/PLAIN; charset=iso-8859-2
Content-Transfer-Encoding: quoted-printable
X-MIME-Autoconverted: from 8bit to quoted-printable by tao.natur.cuni.cz id
	h3EEbdDT112026
Subject: Re: bug in bison-1.875
X-BeenThere: bug-bison@gnu.org
X-Mailman-Version: 2.1b5
Precedence: list
List-Id: Bug reports for Bison, the GNU parser generator <bug-bison.gnu.org>
List-Help: <mailto:bug-bison-request@gnu.org?subject=help>
List-Post: <mailto:bug-bison@gnu.org>
List-Subscribe: <http://mail.gnu.org/mailman/listinfo/bug-bison>,
	<mailto:bug-bison-request@gnu.org?subject=subscribe>
List-Archive: <http://mail.gnu.org/pipermail/bug-bison>
List-Unsubscribe: <http://mail.gnu.org/mailman/listinfo/bug-bison>,
	<mailto:bug-bison-request@gnu.org?subject=unsubscribe>
X-List-Received-Date: Mon, 14 Apr 2003 14:38:12 -0000

Hi Paul,
  here're some answers from DEC/COMPAQ/HP engineers. The compiler shouldn=
't
crash in future on _Bool's, but it still won't be supported. I'm not a C
programmer, so I cannot comment on this. To me it's not clear now what to=
 do
actually. Unfortunately, I do not have a direct contact to the developers=
, only
via customer support. Feel free to bug them on this if you have any quest=
ions.
Thanks.
--=20
Martin Mokrejs <mmokrejs@natur.cuni.cz>, <m.mokrejs@gsf.de>
PGP5.0i key is at http://www.natur.cuni.cz/~mmokrejs
MIPS / Institute for Bioinformatics <http://mips.gsf.de>
GSF - National Research Center for Environment and Health
Ingolstaedter Landstrasse 1, D-85764 Neuherberg, Germany
tel.: +49-89-3187 3683 , fax:=A0+49-89-3187 3585

---------- Forwarded message ----------
From: "Belgardt, Wolfgang" <Wolfgang.Belgardt@hp.com>
To: Martin MOKREJ=A9 <mmokrejs@natur.cuni.cz>
Date: Mon, 14 Apr 2003 16:26:40 +0200
Subject: RE: Bug in C compiler Compiler Bug for Case   3411658RE

Dear Mr Mokreis,

I have send your compiler log file to c++ engineering.
Here is the answer.

	We understand this is a compiler problem.  I do not know when
	we will have a fix.

	From what I can tell, the customer is running a configuration script to
	see if an implementation supports the boolean data type defined in C99.

	Versions of Compaq C prior to V6.5 did not support this, but V6.5 does
	have some support.  However, we do not support the initialization of _Bo=
ol's
	to an address.  So the line in his program:

	bool e =3D &s;

	Should generate a compiler error instead of a crash.

            Support for a conversion of an address to a bool is "undefine=
d behavior" according to
	the C99 standard.  So, it's valid for out compiler to generate an error =
for this case.

	I would suggest the customer modify the configuration script so that the=
 line in question
	is replaced with any other line that will generate a error.


	I find it surprising the Bison would rely on the ability to initialize a=
 static _Bool with
	the address of an object.

	I hope this helps,





Mit freundlichen Gr=FCssen / Kind Regards


Wolfgang Belgardt
Customer Support Consultant

Hewlett-Packard GmbH
Customer Support
Bonsiepen 5
D-45136 Essen
Phone: ++49 (0) 201 2663 258
Fax:    	 ++49 (0) 201 2663 200
mobil: 	  +49 (0171 3357 256)
E-mail:  Wolfgang.Belgardt@hp.com
http://www.hp.com/de
_________________________________________________________________________=
_________
Hewlett-Packard GmbH
Gesch=E4ftsf=FChrer: J=F6rg Menno Harms (Vorsitzender), J=FCrgen Banhardt=
, Wolfram Fischer,
 Rainer Kaczmarczyk, B=E4rbel Schmidt, Fritz Schuller, Regine Stachelhaus
Vorsitzender des Aufsichtsrats: Heribert Schmitz
Sitz der Gesellschaft: B=F6blingen, Amtsgericht B=F6blingen HRB 4081

-----Original Message-----
From: Martin MOKREJ=A9 [mailto:mmokrejs@natur.cuni.cz]
Sent: Friday, April 11, 2003 11:15
To: Belgardt, Wolfgang
Subject: RE: Bug in C compiler Compiler Bug for Case 3411658RE

Dear Mr. Belgardt,
  the former was the testcase how to reproduce the crash. But could the
developers tell me what is wrong in the configure code of GNU Bison?
The following snippet I see in config.log file after configure was run:

configure:4876: checking for stdbool.h that conforms to C99
configure:4930: cc -c -O2 -arch ev56 -I/software/@sys/usr/include -I/usr/=
local/include -I/usr/local/openssl/include conftest.
c >&5
cc: Error: configure, line 4938: Bug found in compiler: generate_address_=
constant : Unexpected opcode. (compilerbug)
          bool e =3D &s;
-------------------^
Internal compiler error detected at line 1512 in file /usr/proj/decc2/ccd=
tk-v4-2/src/me_gemc/initgen.c.
cc: Fatal: A memory access violation (bus error or segmentation fault)
has occurred.  Please submit a problem report.
configure:4933: $? =3D 1
configure: failed program was:
| #line 4881 "configure"
| /* confdefs.h.  */
|
| #define PACKAGE_NAME "GNU Bison"
| #define PACKAGE_TARNAME "bison"
| #define PACKAGE_VERSION "1.875a"
| #define PACKAGE_STRING "GNU Bison 1.875a"
| #define PACKAGE_BUGREPORT "bug-bison@gnu.org"
| #define PACKAGE "bison"
| #define VERSION "1.875a"
| #define _GNU_SOURCE 1
| #define STDC_HEADERS 1
| #define HAVE_SYS_TYPES_H 1
| #define HAVE_SYS_STAT_H 1
| #define HAVE_STDLIB_H 1
| #define HAVE_STRING_H 1
| #define HAVE_MEMORY_H 1
| #define HAVE_STRINGS_H 1
| #define HAVE_INTTYPES_H 1
| #define HAVE_STDINT_H 1
| #define HAVE_UNISTD_H 1
| #define YYTEXT_POINTER 1
| #define M4 "/software/@sys/usr/bin/m4"
| #define STDC_HEADERS 1
| #define HAVE_CTYPE_H 1
| #define HAVE_LOCALE_H 1
| #define HAVE_MEMORY_H 1
| #define HAVE_STDLIB_H 1
| #define HAVE_STRING_H 1
| #define HAVE_UNISTD_H 1
| /* end confdefs.h.  */
|
|         #include <stdbool.h>
|         #ifndef bool
|          "error: bool is not defined"
|         #endif
|         #ifndef false
|          "error: false is not defined"
|         #endif
|         #if false
|          "error: false is not 0"
|         #endif
|         #ifndef true
|          "error: false is not defined"
|         #endif
|         #if true !=3D 1
|          "error: true is not 1"
|         #endif
|         #ifndef __bool_true_false_are_defined
|          "error: __bool_true_false_are_defined is not defined"
|         #endif
|
|         struct s { _Bool s: 1; _Bool t; } s;
|
|         char a[true =3D=3D 1 ? 1 : -1];
|         char b[false =3D=3D 0 ? 1 : -1];
|         char c[__bool_true_false_are_defined =3D=3D 1 ? 1 : -1];
|         char d[(bool) -0.5 =3D=3D true ? 1 : -1];
|         bool e =3D &s;
|         char f[(_Bool) -0.0 =3D=3D false ? 1 : -1];
|         char g[true];
|         char h[sizeof (_Bool)];
|         char i[sizeof s.t];
|
| int
| main ()
| {
|  return !a + !b + !c + !d + !e + !f + !g + !h + !i;
|   ;
|   return 0;
| }
configure:4950: result: no

They can get the code form ftp://alpha.gnu.org/pub/gnu/bison

I believe this code is NOT wrong. And therefore, I'd like to get the *fix=
ed*
version of the compiler and see that this code gets compiled or explanati=
on
what's wrong with it. I'm sure bison developers will apreciate that too. =
;)

Many thanks
Martin

On Thu, 10 Apr 2003, Belgardt, Wolfgang wrote:

> Hello Mr.Morkejs,
>
> This is for Mr. Bhanu and  his case 3411658RE
>
> I have send the contents of your Email to c++ engineering.
> Engineering says:
>
> We acknowledge that this is a compiler problem.  We have entered
>       a problem report for it in our internal bug tracking system.
>
>       While the compiler should not crash, the input program is not val=
id.
>       One can not assign an address to a Boolean.  The compiler should
>       have generated an error for this program.
>
>       So, please let the customer know that we are sorry for the compil=
er crash.
>       The solution is to modify the program so that address types are s=
tored
>       in pointer variables.
>
>       I hope this will satisfy you.
>
> Can you give me please a short feedback , whether I can close the case?
>
>
>
> Mit feundlichen Gr=FCssen/ Kind Regards
>
>
> Wolfgang Belgardt
> Customer Support Consultant
>
> Hewlett-Packard GmbH
> Customer Support
> Bonsiepen 5
> D-45136 Essen
> Phone:        ++49 (0) 201 2663 258
> Fax:          ++49 (0) 201 2663 200
> mobil:          +49 (0171 3357 256)
> E-mail:        Wolfgang.Belgardt@hp.com
> http://www.hp.com/de
>
> Hewlett-Packard GmbH
> Gesch=E4ftsf=FChrer: J=F6rg Menno Harms (Vorsitzender), J=FCrgen Banhar=
dt, Wolfram Fischer,
>  Rainer Kaczmarczyk, B=E4rbel Schmidt, Fritz Schuller, Regine Stachelha=
us
> Vorsitzender des Aufsichtsrats: Heribert Schmitz
> Sitz der Gesellschaft: B=F6blingen, Amtsgericht B=F6blingen HRB 4081
>
> -----Original Message-----
> From: Martin MOKREJ=A9 [mailto:mmokrejs@natur.cuni.cz]
> Sent: Thursday, April 10, 2003 16:20
> To: Belgardt, Wolfgang
> Subject: RE: Bug in C compiler
>
> Here is the original thread under which I posted this bug to cxx list.
> Below is actually one of the responses in that thread, I believe from K=
en Benneth too.
> I believe the very same bug got posted to the C bug database as cxxc_bu=
gs9889,
> but I don't have access to that database so I cannot say exactly what's=
 in.
> If you query the archive of the cxx list, you will find the original po=
st, where
> this happened during GNU bison compilation(actually during the configur=
e test
> if I remember right).
>
> Hth
> martin
>
>
> From: compaq_cxx.bugs@compaq.com
> To: mmokrejs@natur.cuni.cz
> Date: Mon, 3 Mar 2003 13:30:44 -0500
> Subject: Re: CPP#5815: Subj: RE: cc version 6.5-207 bug on Tru64Unix 5.=
1A
>
> -----------------------------------------------------------------------=
---------
> Martin,
>
> Thanks for the bug report. It reduces down to the following.
>
> Compaq C/C++ Team
>
> cxxosf.zko.dec.com> envir
> alphaosf cdev dbg bl48
>
> cxxosf.zko.dec.com> $RTS_COMPILER -c t2.c
> cc: Error: t2.c, line 2: Bug found in compiler: generate_address_consta=
nt :
> Unexpected opcode. (compilerbug)
> _Bool  e =3D &i;
> -----------^
> Internal compiler error detected at line 1512 in file
> /usr/proj/decc2/mainline/src/me_gemc/initgen.c.
> cc: Fatal: A memory access violation (bus error or segmentation fault)
> has occurred.  Please submit a problem report.
>
>
> cxxosf.zko.dec.com> cat t2.c
> int i;
> _Bool  e =3D &i;
>
>
>
> Please send all Compaq C/C++ Support requests to compaq_cxx.bugs@compaq=
.com
> Reply to this message for further correspondence regarding THIS support
> request.  Thank you for choosing Compaq C/C++.
>
>
>
> On Thu, 10 Apr 2003, Belgardt, Wolfgang wrote:
>
> > Hello Mr. Mokrejs,
> >
> > I  talk wit Mr. Bhanu and I have him requested to send me a  detailed=
 description and if possible a log file which contained error messages.
> >
> > Can you please send me this?
> >
> >
> > Mit freundlichen Gr=FCssen
> >
> >
> > Wolfgang Belgardt
> > Customer Support Consultant
> >
> > Hewlett-Packard GmbH
> > Customer Support
> > Bonsiepen 5
> > D-45136 Essen
> > Phone: ++49 (0) 201 2663 258
> > Fax:           ++49 (0) 201 2663 200
> > mobil:          +49 (0171 3357 256)
> > E-mail:  Wolfgang.Belgardt@hp.com
> > http://www.hp.com/de
> > _____________________________________________________________________=
_____________
> > Hewlett-Packard GmbH
> > Gesch=E4ftsf=FChrer: J=F6rg Menno Harms (Vorsitzender), J=FCrgen Banh=
ardt, Wolfram Fischer,
> >  Rainer Kaczmarczyk, B=E4rbel Schmidt, Fritz Schuller, Regine Stachel=
haus
> > Vorsitzender des Aufsichtsrats: Heribert Schmitz
> > Sitz der Gesellschaft: B=F6blingen, Amtsgericht B=F6blingen HRB 4081
> >
> > -----Original Message-----
> > From: Martin MOKREJ=A9 [mailto:mmokrejs@natur.cuni.cz]
> > Sent: Thursday, April 10, 2003 12:22
> > To: Belgardt, Wolfgang
> > Subject: Re: Bug in C compiler
> >
> > Dear Mr. Belhardt,
> >   I'm responding in behalf of Yogesh Bhanu, our sysadmin. I've report=
ed the bug
> > to CXX developers as those were the only ones whom I could reach via =
internet.
> > Here originates the misunderstanding: the bug found is in present in =
DEC C
> > compiler, Ken Benneth from CXX list replied:
> >
> > This bug report is in the C bug database as cxxc_bugs9889. It is mark=
ed
> > to be fixed in the next release of the compiler. I do not have any ot=
her
> > information. I've added you email to the problem report.
> > Ken
> >
> > However, the bug can be reproduced for example when compiling GNU bis=
on program.
> > We are highly interrested in getting the fix, as supposedly the same =
bug we've
> > hit several times. It was nicely repeatable with publicly available G=
NU bison,
> > so that's the reason why it was reported as such a bug.
> >
> > In current situation, we cannot even confirm that the bug was really =
fixed!
> > Please do not hesistate me to phone if you have any further questions.
> >
> > > Hello Mr. Bhanu,
> > >
> > > I can't find a solution at this moment. All information are referen=
ced
> > > to the next release.
> > > Well, I have send a Email  to the c++ engineers and ask they , when=
 you
> > > can received a solution for this problem.
> > > When  I do have a new information,  I will send a Email  to you.
> > >
> > > I hope that's ok
> > >
> > >
> > >Best Regards/
> > >Mit freundlichen Gr=FCssen
> >
> >
> > $ cc -V
> > Compaq C V6.5-207 (dtk) on Compaq Tru64 UNIX V5.1A (Rev. 1885)
> > Compiler Driver V6.5-207 (dtk) (dtk) cc Driver
> > $
> >
> > Yours,
> > --
> > Martin Mokrejs <mmokrejs@natur.cuni.cz>, <m.mokrejs@gsf.de>
> > PGP5.0i key is at http://www.natur.cuni.cz/~mmokrejs
> > MIPS / Institute for Bioinformatics <http://mips.gsf.de>
> > GSF - National Research Center for Environment and Health
> > Ingolstaedter Landstrasse 1, D-85764 Neuherberg, Germany
> > tel.: +49-89-3187 3683 , fax: +49-89-3187 3585
> >
>
> --
> Martin Mokrejs <mmokrejs@natur.cuni.cz>, <m.mokrejs@gsf.de>
> PGP5.0i key is at http://www.natur.cuni.cz/~mmokrejs
> MIPS / Institute for Bioinformatics <http://mips.gsf.de>
> GSF - National Research Center for Environment and Health
> Ingolstaedter Landstrasse 1, D-85764 Neuherberg, Germany
> tel.: +49-89-3187 3683 , fax: +49-89-3187 3585
>

--
Martin Mokrejs <mmokrejs@natur.cuni.cz>, <m.mokrejs@gsf.de>
PGP5.0i key is at http://www.natur.cuni.cz/~mmokrejs
MIPS / Institute for Bioinformatics <http://mips.gsf.de>
GSF - National Research Center for Environment and Health
Ingolstaedter Landstrasse 1, D-85764 Neuherberg, Germany
tel.: +49-89-3187 3683 , fax: +49-89-3187 3585



From MAILER-DAEMON Mon Apr 14 13:12:09 2003
Received: from list by monty-python.gnu.org with archive (Exim 4.10.13)
	id 1957TS-0004eX-00
	for mharc-bug-bison@gnu.org; Mon, 14 Apr 2003 13:10:30 -0400
Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.10.13)
	id 1957T9-0004UB-00
	for bug-bison@gnu.org; Mon, 14 Apr 2003 13:10:11 -0400
Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.10.13)
	id 1957SG-0003yg-00
	for bug-bison@gnu.org; Mon, 14 Apr 2003 13:09:17 -0400
Received: from tao.natur.cuni.cz ([195.113.56.1])
	by monty-python.gnu.org with esmtp (Exim 4.10.13)
	id 1957QG-000274-00
	for bug-bison@gnu.org; Mon, 14 Apr 2003 13:07:12 -0400
Received: from tao.natur.cuni.cz (tao.natur.cuni.cz [195.113.56.1])
	by tao.natur.cuni.cz (8.12.9/8.12.8) with ESMTP id h3EH7BDT211951
	for <bug-bison@gnu.org>; Mon, 14 Apr 2003 19:07:11 +0200 (MDT)
X-Obalka-From: mmokrejs@natur.cuni.cz
X-Obalka-To: <bug-bison@gnu.org>
Date: Mon, 14 Apr 2003 19:07:11 +0200 (CEST)
From: =?iso-8859-2?Q?Martin_MOKREJ=A9?= <mmokrejs@natur.cuni.cz>
To: bug-bison@gnu.org
In-Reply-To: <Pine.OSF.4.51.0304141631120.370497@tao.natur.cuni.cz>
Message-ID: <Pine.OSF.4.51.0304141903090.162938@tao.natur.cuni.cz>
References: <Pine.OSF.4.51.0304141631120.370497@tao.natur.cuni.cz>
MIME-Version: 1.0
Content-Type: TEXT/PLAIN; charset=iso-8859-2
Content-Transfer-Encoding: quoted-printable
X-MIME-Autoconverted: from 8bit to quoted-printable by tao.natur.cuni.cz id
	h3EH7BDT211951
Subject: Re: bug in bison-1.875
X-BeenThere: bug-bison@gnu.org
X-Mailman-Version: 2.1b5
Precedence: list
List-Id: Bug reports for Bison, the GNU parser generator <bug-bison.gnu.org>
List-Help: <mailto:bug-bison-request@gnu.org?subject=help>
List-Post: <mailto:bug-bison@gnu.org>
List-Subscribe: <http://mail.gnu.org/mailman/listinfo/bug-bison>,
	<mailto:bug-bison-request@gnu.org?subject=subscribe>
List-Archive: <http://mail.gnu.org/pipermail/bug-bison>
List-Unsubscribe: <http://mail.gnu.org/mailman/listinfo/bug-bison>,
	<mailto:bug-bison-request@gnu.org?subject=unsubscribe>
X-List-Received-Date: Mon, 14 Apr 2003 17:10:28 -0000

Hi,
 I checked current cvs version on Tru65Unix 5.1A and now all tests succee=
d or
get skipped. Is there any explanation what happened to the code that now =
I do
not observer failures when bison get's compiled with -O2 CFLAG? Of course=
 I'm
glad I don't have to use "-O0 -g2". ;)

 However, although cc crashes on the _Bool testcase run by configure, con=
figure
writes to stdout that _Bool is available. Shouldn' it say no?

checking for stdbool.h that conforms to C99... no
checking for _Bool... yes
checking for inline... inline

TIA
--=20
Martin Mokrejs <mmokrejs@natur.cuni.cz>, <m.mokrejs@gsf.de>
PGP5.0i key is at http://www.natur.cuni.cz/~mmokrejs
MIPS / Institute for Bioinformatics <http://mips.gsf.de>
GSF - National Research Center for Environment and Health
Ingolstaedter Landstrasse 1, D-85764 Neuherberg, Germany
tel.: +49-89-3187 3683 , fax:=A0+49-89-3187 3585



From MAILER-DAEMON Thu Apr 17 02:28:32 2003
Received: from list by monty-python.gnu.org with archive (Exim 4.10.13)
	id 1962sq-0004jC-00
	for mharc-bug-bison@gnu.org; Thu, 17 Apr 2003 02:28:32 -0400
Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.10.13)
	id 1962sk-0004Wq-00
	for bug-bison@gnu.org; Thu, 17 Apr 2003 02:28:26 -0400
Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.10.13)
	id 1962sf-0004MY-00
	for bug-bison@gnu.org; Thu, 17 Apr 2003 02:28:25 -0400
Received: from moutng.kundenserver.de ([212.227.126.171])
	by monty-python.gnu.org with esmtp (Exim 4.10.13)
	id 1962sd-0004JF-00
	for bug-bison@gnu.org; Thu, 17 Apr 2003 02:28:19 -0400
Received: from [212.227.126.162] (helo=mrelayng.kundenserver.de)
	by moutng.kundenserver.de with esmtp (Exim 3.35 #1)
	id 1962sd-0001tm-00
	for bug-bison@gnu.org; Thu, 17 Apr 2003 08:28:19 +0200
Received: from [80.129.72.137] (helo=orion.local)
	(TLSv1:EDH-RSA-DES-CBC3-SHA:168)	(Exim 3.35 #1)	id 1962sa-0002eW-01
	for bug-bison@gnu.org; Thu, 17 Apr 2003 08:28:17 +0200
Received: from localhost (localhost [127.0.0.1])h3H6RxN28578
	for <bug-bison@gnu.org>; Thu, 17 Apr 2003 08:27:59 +0200
Date: Thu, 17 Apr 2003 08:27:59 +0200 (CEST)
Message-Id: <20030417.082759.71547529.wl@gnu.org>
To: bug-bison@gnu.org
From: Werner LEMBERG <wl@gnu.org>
X-Mailer: Mew version 4.0.51 on Emacs 21.3.50.1 / Mule 5.0 (SAKAKI)
Mime-Version: 1.0
Content-Type: Multipart/Mixed;
 boundary="--Next_Part(Thu_Apr_17_08:27:59_2003_499)--"
Content-Transfer-Encoding: 7bit
Subject: problem with groff's pic.y grammar
X-BeenThere: bug-bison@gnu.org
X-Mailman-Version: 2.1b5
Precedence: list
List-Id: Bug reports for Bison, the GNU parser generator <bug-bison.gnu.org>
List-Help: <mailto:bug-bison-request@gnu.org?subject=help>
List-Post: <mailto:bug-bison@gnu.org>
List-Subscribe: <http://mail.gnu.org/mailman/listinfo/bug-bison>,
	<mailto:bug-bison-request@gnu.org?subject=subscribe>
List-Archive: <http://mail.gnu.org/pipermail/bug-bison>
List-Unsubscribe: <http://mail.gnu.org/mailman/listinfo/bug-bison>,
	<mailto:bug-bison-request@gnu.org?subject=unsubscribe>
X-List-Received-Date: Thu, 17 Apr 2003 06:28:29 -0000

----Next_Part(Thu_Apr_17_08:27:59_2003_499)--
Content-Type: Text/Plain; charset=us-ascii
Content-Transfer-Encoding: 7bit


Please check the attached pic.y grammar.  With byacc, I get a clean
run.  With bison 1.875, I get 8 shift/reduce conflicts, and the
resulting output doesn't work at all.  How is this possible?


    Werner

----Next_Part(Thu_Apr_17_08:27:59_2003_499)--
Content-Type: Text/Plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Content-Disposition: inline; filename="pic.y"

/* Copyright (C) 1989, 1990, 1991, 1992, 2000, 2001, 2002, 2003
   Free Software Foundation, Inc.
     Written by James Clark (jjc@jclark.com)

This file is part of groff.

groff is free software; you can redistribute it and/or modify it under
the terms of the GNU General Public License as published by the Free
Software Foundation; either version 2, or (at your option) any later
version.

groff is distributed in the hope that it will be useful, but WITHOUT ANY
WARRANTY; without even the implied warranty of MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
for more details.

You should have received a copy of the GNU General Public License along
with groff; see the file COPYING.  If not, write to the Free Software
Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
%{
#include "pic.h"
#include "ptable.h"
#include "object.h"

extern int delim_flag;
extern void do_copy(const char *);
extern void copy_rest_thru(const char *, const char *);
extern void copy_file_thru(const char *, const char *, const char *);
extern void push_body(const char *);
extern void do_for(char *var, double from, double to,
		   int by_is_multiplicative, double by, char *body);
extern void do_lookahead();

/* Maximum number of characters produced by printf("%g") */
#define GDIGITS 14

int yylex();
void yyerror(const char *);

void reset(const char *nm);
void reset_all();

place *lookup_label(const char *);
void define_label(const char *label, const place *pl);

direction current_direction;
position current_position;

implement_ptable(place)

PTABLE(place) top_table;

PTABLE(place) *current_table = &top_table;
saved_state *current_saved_state = 0;

object_list olist;

const char *ordinal_postfix(int n);
const char *object_type_name(object_type type);
char *format_number(const char *form, double n);
char *do_sprintf(const char *form, const double *v, int nv);

%}


%union {
	char *str;
	int n;
	double x;
	struct { double x, y; } pair;
	struct { double x; char *body; } if_data;
	struct { char *str; const char *filename; int lineno; } lstr;
	struct { double *v; int nv; int maxv; } dv;
	struct { double val; int is_multiplicative; } by;
	place pl;
	object *obj;
	corner crn;
	path *pth;
	object_spec *spec;
	saved_state *pstate;
	graphics_state state;
	object_type obtype;
}

%token <str> LABEL
%token <str> VARIABLE
%token <x> NUMBER
%token <lstr> TEXT
%token <lstr> COMMAND_LINE
%token <str> DELIMITED
%token <n> ORDINAL
%token TH
%token LEFT_ARROW_HEAD
%token RIGHT_ARROW_HEAD
%token DOUBLE_ARROW_HEAD
%token LAST
%token UP
%token DOWN
%token LEFT
%token RIGHT
%token BOX
%token CIRCLE
%token ELLIPSE
%token ARC
%token LINE
%token ARROW
%token MOVE
%token SPLINE
%token HEIGHT
%token RADIUS
%token WIDTH
%token DIAMETER
%token UP
%token DOWN
%token RIGHT
%token LEFT
%token FROM
%token TO
%token AT
%token WITH
%token BY
%token THEN
%token SOLID
%token DOTTED
%token DASHED
%token CHOP
%token SAME
%token INVISIBLE
%token LJUST
%token RJUST
%token ABOVE
%token BELOW
%token OF
%token THE
%token WAY
%token BETWEEN
%token AND
%token HERE
%token DOT_N
%token DOT_E	
%token DOT_W
%token DOT_S
%token DOT_NE
%token DOT_SE
%token DOT_NW
%token DOT_SW
%token DOT_C
%token DOT_START
%token DOT_END
%token DOT_X
%token DOT_Y
%token DOT_HT
%token DOT_WID
%token DOT_RAD
%token SIN
%token COS
%token ATAN2
%token LOG
%token EXP
%token SQRT
%token K_MAX
%token K_MIN
%token INT
%token RAND
%token SRAND
%token COPY
%token THRU
%token TOP
%token BOTTOM
%token UPPER
%token LOWER
%token SH
%token PRINT
%token CW
%token CCW
%token FOR
%token DO
%token IF
%token ELSE
%token ANDAND
%token OROR
%token NOTEQUAL
%token EQUALEQUAL
%token LESSEQUAL
%token GREATEREQUAL
%token LEFT_CORNER
%token RIGHT_CORNER
%token NORTH
%token SOUTH
%token EAST
%token WEST
%token CENTER
%token END
%token START
%token RESET
%token UNTIL
%token PLOT
%token THICKNESS
%token FILL
%token COLORED
%token OUTLINED
%token SHADED
%token ALIGNED
%token SPRINTF
%token COMMAND

%token DEFINE
%token UNDEF

%left '.'

/* this ensures that plot 17 "%g" parses as (plot 17 "%g") */
%left PLOT
%left TEXT SPRINTF

/* give text adjustments higher precedence than TEXT, so that
box "foo" above ljust == box ("foo" above ljust)
*/

%left LJUST RJUST ABOVE BELOW

%left LEFT RIGHT
/* Give attributes that take an optional expression a higher
precedence than left and right, so that eg `line chop left'
parses properly. */
%left CHOP SOLID DASHED DOTTED UP DOWN FILL COLORED OUTLINED
%left LABEL

%left VARIABLE NUMBER '(' SIN COS ATAN2 LOG EXP SQRT K_MAX K_MIN INT RAND SRAND LAST 
%left ORDINAL HERE '`'

%left BOX CIRCLE ELLIPSE ARC LINE ARROW SPLINE '['

/* these need to be lower than '-' */
%left HEIGHT RADIUS WIDTH DIAMETER FROM TO AT THICKNESS

/* these must have higher precedence than CHOP so that `label %prec CHOP'
works */
%left DOT_N DOT_E DOT_W DOT_S DOT_NE DOT_SE DOT_NW DOT_SW DOT_C
%left DOT_START DOT_END TOP BOTTOM LEFT_CORNER RIGHT_CORNER
%left UPPER LOWER NORTH SOUTH EAST WEST CENTER START END

%left ','
%left OROR
%left ANDAND
%left EQUALEQUAL NOTEQUAL
%left '<' '>' LESSEQUAL GREATEREQUAL

%left BETWEEN OF
%left AND

%left '+' '-'
%left '*' '/' '%'
%right '!'
%right '^'

%type <x> expr any_expr text_expr
%type <by> optional_by
%type <pair> expr_pair position_not_place
%type <if_data> simple_if
%type <obj> nth_primitive
%type <crn> corner
%type <pth> path label_path relative_path
%type <pl> place label element element_list middle_element_list
%type <spec> object_spec
%type <pair> position
%type <obtype> object_type
%type <n> optional_ordinal_last ordinal
%type <str> until
%type <dv> sprintf_args
%type <lstr> text print_args print_arg

%%

top:
	optional_separator
	| element_list
		{
		  if (olist.head)
		    print_picture(olist.head);
		}
	;


element_list:
	optional_separator middle_element_list optional_separator
		{ $$ = $2; }
	;

middle_element_list:
	element
		{ $$ = $1; }
	| middle_element_list separator element
		{ $$ = $1; }
	;

optional_separator:
	/* empty */
	| separator
	;

separator:
	';'
	| separator ';'
	;

placeless_element:
	VARIABLE '=' any_expr
		{
		  define_variable($1, $3);
		  a_delete $1;
		}
	| VARIABLE ':' '=' any_expr
		{
		  place *p = lookup_label($1);
		  if (!p) {
		    lex_error("variable `%1' not defined", $1);
		    YYABORT;
		  }
		  p->obj = 0;
		  p->x = $4;
		  p->y = 0.0;
		  a_delete $1;
		}
	| UP
		{ current_direction = UP_DIRECTION; }
	| DOWN
		{ current_direction = DOWN_DIRECTION; }
	| LEFT
		{ current_direction = LEFT_DIRECTION; }
	| RIGHT
		{ current_direction = RIGHT_DIRECTION; }
	| COMMAND_LINE
		{
		  olist.append(make_command_object($1.str, $1.filename,
						   $1.lineno));
		}
	| COMMAND print_args
		{
		  olist.append(make_command_object($2.str, $2.filename,
						   $2.lineno));
		}
	| PRINT print_args
		{
		  fprintf(stderr, "%s\n", $2.str);
		  a_delete $2.str;
		  fflush(stderr);
		}
	| SH
		{ delim_flag = 1; }
	  DELIMITED
		{
		  delim_flag = 0;
		  if (safer_flag)
		    lex_error("unsafe to run command `%1'", $3);
		  else
		    system($3);
		  a_delete $3;
		}
	| COPY TEXT
		{
		  if (yychar < 0)
		    do_lookahead();
		  do_copy($2.str);
		  // do not delete the filename
		}
	| COPY TEXT THRU
		{ delim_flag = 2; }
	  DELIMITED 
		{ delim_flag = 0; }
	  until
		{
		  if (yychar < 0)
		    do_lookahead();
		  copy_file_thru($2.str, $5, $7);
		  // do not delete the filename
		  a_delete $5;
		  a_delete $7;
		}
	| COPY THRU
		{ delim_flag = 2; }
	  DELIMITED
		{ delim_flag = 0; }
	  until
		{
		  if (yychar < 0)
		    do_lookahead();
		  copy_rest_thru($4, $6);
		  a_delete $4;
		  a_delete $6;
		}
	| FOR VARIABLE '=' expr TO expr optional_by DO
	  	{ delim_flag = 1; }
	  DELIMITED
	  	{
		  delim_flag = 0;
		  if (yychar < 0)
		    do_lookahead();
		  do_for($2, $4, $6, $7.is_multiplicative, $7.val, $10); 
		}
	| simple_if
		{
		  if (yychar < 0)
		    do_lookahead();
		  if ($1.x != 0.0)
		    push_body($1.body);
		  a_delete $1.body;
		}
	| simple_if ELSE
		{ delim_flag = 1; }
	  DELIMITED
		{
		  delim_flag = 0;
		  if (yychar < 0)
		    do_lookahead();
		  if ($1.x != 0.0)
		    push_body($1.body);
		  else
		    push_body($4);
		  a_delete $1.body;
		  a_delete $4;
		}
	| reset_variables
	| RESET
		{ define_variable("scale", 1.0); }
	;

reset_variables:
	RESET VARIABLE
		{
		  reset($2);
		  a_delete $2;
		}
	| reset_variables VARIABLE
		{
		  reset($2);
		  a_delete $2;
		}
	| reset_variables ',' VARIABLE
		{
		  reset($3);
		  a_delete $3;
		}
	;

print_args:
	print_arg
		{ $$ = $1; }
	| print_args print_arg
		{
		  $$.str = new char[strlen($1.str) + strlen($2.str) + 1];
		  strcpy($$.str, $1.str);
		  strcat($$.str, $2.str);
		  a_delete $1.str;
		  a_delete $2.str;
		  if ($1.filename) {
		    $$.filename = $1.filename;
		    $$.lineno = $1.lineno;
		  }
		  else if ($2.filename) {
		    $$.filename = $2.filename;
		    $$.lineno = $2.lineno;
		  }
		}
	;

print_arg:
  	expr							%prec ','
		{
		  $$.str = new char[GDIGITS + 1];
		  sprintf($$.str, "%g", $1);
		  $$.filename = 0;
		  $$.lineno = 0;
		}
	| text
		{ $$ = $1; }
	| position						%prec ','
		{
		  $$.str = new char[GDIGITS + 2 + GDIGITS + 1];
		  sprintf($$.str, "%g, %g", $1.x, $1.y);
		  $$.filename = 0;
		  $$.lineno = 0;
		}
	;

simple_if:
	IF any_expr THEN
		{ delim_flag = 1; }
	DELIMITED
		{
		  delim_flag = 0;
		  $$.x = $2;
		  $$.body = $5;
		}
	;

until:
	/* empty */
		{ $$ = 0; }
	| UNTIL TEXT
		{ $$ = $2.str; }
	;
	
any_expr:
	expr
		{ $$ = $1; }
	| text_expr
		{ $$ = $1; }
	;
	
text_expr:
	text EQUALEQUAL text
		{
		  $$ = strcmp($1.str, $3.str) == 0;
		  a_delete $1.str;
		  a_delete $3.str;
		}
	| text NOTEQUAL text
		{
		  $$ = strcmp($1.str, $3.str) != 0;
		  a_delete $1.str;
		  a_delete $3.str;
		}
	| text_expr ANDAND text_expr
		{ $$ = ($1 != 0.0 && $3 != 0.0); }
	| text_expr ANDAND expr
		{ $$ = ($1 != 0.0 && $3 != 0.0); }
	| expr ANDAND text_expr
		{ $$ = ($1 != 0.0 && $3 != 0.0); }
	| text_expr OROR text_expr
		{ $$ = ($1 != 0.0 || $3 != 0.0); }
	| text_expr OROR expr
		{ $$ = ($1 != 0.0 || $3 != 0.0); }
	| expr OROR text_expr
		{ $$ = ($1 != 0.0 || $3 != 0.0); }
	| '!' text_expr
		{ $$ = ($2 == 0.0); }
	;


optional_by:
	/* empty */
		{
		  $$.val = 1.0;
		  $$.is_multiplicative = 0;
		}
	| BY expr
		{
		  $$.val = $2;
		  $$.is_multiplicative = 0;
		}
	| BY '*' expr
		{
		  $$.val = $3;
		  $$.is_multiplicative = 1;
		}
	;

element:
	object_spec
		{
		  $$.obj = $1->make_object(&current_position,
					   &current_direction);
		  if ($$.obj == 0)
		    YYABORT;
		  delete $1;
		  if ($$.obj)
		    olist.append($$.obj);
		  else {
		    $$.x = current_position.x;
		    $$.y = current_position.y;
		  }
		}
	| LABEL ':' optional_separator element
		{
		  $$ = $4;
		  define_label($1, & $$);
		  a_delete $1;
		}
	| LABEL ':' optional_separator position_not_place
		{
		  $$.obj = 0;
		  $$.x = $4.x;
		  $$.y = $4.y;
		  define_label($1, & $$);
		  a_delete $1;
		}
	| LABEL ':' optional_separator place
		{
		  $$ = $4;
		  define_label($1, & $$);
		  a_delete $1;
		}
	| '{'
		{
		  $<state>$.x = current_position.x;
		  $<state>$.y = current_position.y;
		  $<state>$.dir = current_direction;
		}
	  element_list '}'
		{
		  current_position.x = $<state>2.x;
		  current_position.y = $<state>2.y;
		  current_direction = $<state>2.dir;
		}
	  optional_element
		{
		  $$ = $3;
		}
	| placeless_element
		{
		  $$.obj = 0;
		  $$.x = current_position.x;
		  $$.y = current_position.y;
		}
	;

optional_element:
	/* empty */
		{}
	| element
		{}
	;

object_spec:
	BOX
		{ $$ = new object_spec(BOX_OBJECT); }
	| CIRCLE
		{ $$ = new object_spec(CIRCLE_OBJECT); }
	| ELLIPSE
		{ $$ = new object_spec(ELLIPSE_OBJECT); }
	| ARC
		{
		  $$ = new object_spec(ARC_OBJECT);
		  $$->dir = current_direction;
		}
	| LINE
		{
		  $$ = new object_spec(LINE_OBJECT);
		  lookup_variable("lineht", & $$->segment_height);
		  lookup_variable("linewid", & $$->segment_width);
		  $$->dir = current_direction;
		}
	| ARROW
		{
		  $$ = new object_spec(ARROW_OBJECT);
		  lookup_variable("lineht", & $$->segment_height);
		  lookup_variable("linewid", & $$->segment_width);
		  $$->dir = current_direction;
		}
	| MOVE
		{
		  $$ = new object_spec(MOVE_OBJECT);
		  lookup_variable("moveht", & $$->segment_height);
		  lookup_variable("movewid", & $$->segment_width);
		  $$->dir = current_direction;
		}
	| SPLINE
		{
		  $$ = new object_spec(SPLINE_OBJECT);
		  lookup_variable("lineht", & $$->segment_height);
		  lookup_variable("linewid", & $$->segment_width);
		  $$->dir = current_direction;
		}
	| text							%prec TEXT
		{
		  $$ = new object_spec(TEXT_OBJECT);
		  $$->text = new text_item($1.str, $1.filename, $1.lineno);
		}
	| PLOT expr
		{
		  $$ = new object_spec(TEXT_OBJECT);
		  $$->text = new text_item(format_number(0, $2), 0, -1);
		}
	| PLOT expr text
		{
		  $$ = new object_spec(TEXT_OBJECT);
		  $$->text = new text_item(format_number($3.str, $2),
					   $3.filename, $3.lineno);
		  a_delete $3.str;
		}
	| '[' 
		{
		  saved_state *p = new saved_state;
		  $<pstate>$ = p;
		  p->x = current_position.x;
		  p->y = current_position.y;
		  p->dir = current_direction;
		  p->tbl = current_table;
		  p->prev = current_saved_state;
		  current_position.x = 0.0;
		  current_position.y = 0.0;
		  current_table = new PTABLE(place);
		  current_saved_state = p;
		  olist.append(make_mark_object());
		}
	  element_list ']'
		{
		  current_position.x = $<pstate>2->x;
		  current_position.y = $<pstate>2->y;
		  current_direction = $<pstate>2->dir;
		  $$ = new object_spec(BLOCK_OBJECT);
		  olist.wrap_up_block(& $$->oblist);
		  $$->tbl = current_table;
		  current_table = $<pstate>2->tbl;
		  current_saved_state = $<pstate>2->prev;
		  delete $<pstate>2;
		}
	| object_spec HEIGHT expr
		{
		  $$ = $1;
		  $$->height = $3;
		  $$->flags |= HAS_HEIGHT;
		}
	| object_spec RADIUS expr
		{
		  $$ = $1;
		  $$->radius = $3;
		  $$->flags |= HAS_RADIUS;
		}
	| object_spec WIDTH expr
		{
		  $$ = $1;
		  $$->width = $3;
		  $$->flags |= HAS_WIDTH;
		}
	| object_spec DIAMETER expr
		{
		  $$ = $1;
		  $$->radius = $3/2.0;
		  $$->flags |= HAS_RADIUS;
		}
	| object_spec expr					%prec HEIGHT
		{
		  $$ = $1;
		  $$->flags |= HAS_SEGMENT;
		  switch ($$->dir) {
		  case UP_DIRECTION:
		    $$->segment_pos.y += $2;
		    break;
		  case DOWN_DIRECTION:
		    $$->segment_pos.y -= $2;
		    break;
		  case RIGHT_DIRECTION:
		    $$->segment_pos.x += $2;
		    break;
		  case LEFT_DIRECTION:
		    $$->segment_pos.x -= $2;
		    break;
		  }
		}
	| object_spec UP
		{
		  $$ = $1;
		  $$->dir = UP_DIRECTION;
		  $$->flags |= HAS_SEGMENT;
		  $$->segment_pos.y += $$->segment_height;
		}
	| object_spec UP expr
		{
		  $$ = $1;
		  $$->dir = UP_DIRECTION;
		  $$->flags |= HAS_SEGMENT;
		  $$->segment_pos.y += $3;
		}
	| object_spec DOWN
		{
		  $$ = $1;
		  $$->dir = DOWN_DIRECTION;
		  $$->flags |= HAS_SEGMENT;
		  $$->segment_pos.y -= $$->segment_height;
		}
	| object_spec DOWN expr
		{
		  $$ = $1;
		  $$->dir = DOWN_DIRECTION;
		  $$->flags |= HAS_SEGMENT;
		  $$->segment_pos.y -= $3;
		}
	| object_spec RIGHT
		{
		  $$ = $1;
		  $$->dir = RIGHT_DIRECTION;
		  $$->flags |= HAS_SEGMENT;
		  $$->segment_pos.x += $$->segment_width;
		}
	| object_spec RIGHT expr
		{
		  $$ = $1;
		  $$->dir = RIGHT_DIRECTION;
		  $$->flags |= HAS_SEGMENT;
		  $$->segment_pos.x += $3;
		}
	| object_spec LEFT
		{
		  $$ = $1;
		  $$->dir = LEFT_DIRECTION;
		  $$->flags |= HAS_SEGMENT;
		  $$->segment_pos.x -= $$->segment_width;
		}
	| object_spec LEFT expr
		{
		  $$ = $1;
		  $$->dir = LEFT_DIRECTION;
		  $$->flags |= HAS_SEGMENT;
		  $$->segment_pos.x -= $3;
		}
	| object_spec FROM position
		{
		  $$ = $1;
		  $$->flags |= HAS_FROM;
		  $$->from.x = $3.x;
		  $$->from.y = $3.y;
		}
	| object_spec TO position
		{
		  $$ = $1;
		  if ($$->flags & HAS_SEGMENT)
		    $$->segment_list = new segment($$->segment_pos,
						   $$->segment_is_absolute,
						   $$->segment_list);
		  $$->flags |= HAS_SEGMENT;
		  $$->segment_pos.x = $3.x;
		  $$->segment_pos.y = $3.y;
		  $$->segment_is_absolute = 1;
		  $$->flags |= HAS_TO;
		  $$->to.x = $3.x;
		  $$->to.y = $3.y;
		}
	| object_spec AT position
		{
		  $$ = $1;
		  $$->flags |= HAS_AT;
		  $$->at.x = $3.x;
		  $$->at.y = $3.y;
		  if ($$->type != ARC_OBJECT) {
		    $$->flags |= HAS_FROM;
		    $$->from.x = $3.x;
		    $$->from.y = $3.y;
		  }
		}
	| object_spec WITH path
		{
		  $$ = $1;
		  $$->flags |= HAS_WITH;
		  $$->with = $3;
		}
	| object_spec WITH position				%prec ','
		{
		  $$ = $1;
		  $$->flags |= HAS_WITH;
		  position pos;
		  pos.x = $3.x;
		  pos.y = $3.y;
		  $$->with = new path(pos);
		}
	| object_spec BY expr_pair
		{
		  $$ = $1;
		  $$->flags |= HAS_SEGMENT;
		  $$->segment_pos.x += $3.x;
		  $$->segment_pos.y += $3.y;
		}
	| object_spec THEN
  		{
		  $$ = $1;
		  if ($$->flags & HAS_SEGMENT) {
		    $$->segment_list = new segment($$->segment_pos,
						   $$->segment_is_absolute,
						   $$->segment_list);
		    $$->flags &= ~HAS_SEGMENT;
		    $$->segment_pos.x = $$->segment_pos.y = 0.0;
		    $$->segment_is_absolute = 0;
		  }
		}
	| object_spec SOLID
		{
		  $$ = $1;	// nothing
		}
	| object_spec DOTTED
		{
		  $$ = $1;
		  $$->flags |= IS_DOTTED;
		  lookup_variable("dashwid", & $$->dash_width);
		}
	| object_spec DOTTED expr
		{
		  $$ = $1;
		  $$->flags |= IS_DOTTED;
		  $$->dash_width = $3;
		}
	| object_spec DASHED
		{
		  $$ = $1;
		  $$->flags |= IS_DASHED;
		  lookup_variable("dashwid", & $$->dash_width);
		}
	| object_spec DASHED expr
		{
		  $$ = $1;
		  $$->flags |= IS_DASHED;
		  $$->dash_width = $3;
		}
	| object_spec FILL
		{
		  $$ = $1;
		  $$->flags |= IS_DEFAULT_FILLED;
		}
	| object_spec FILL expr
		{
		  $$ = $1;
		  $$->flags |= IS_FILLED;
		  $$->fill = $3;
		}
	| object_spec SHADED text
		{
		  $$ = $1;
		  $$->flags |= (IS_SHADED | IS_FILLED);
		  $$->shaded = new char[strlen($3.str)+1];
		  strcpy($$->shaded, $3.str);
		}
	| object_spec COLORED text
		{
		  $$ = $1;
		  $$->flags |= (IS_SHADED | IS_OUTLINED | IS_FILLED);
		  $$->shaded = new char[strlen($3.str)+1];
		  strcpy($$->shaded, $3.str);
		  $$->outlined = new char[strlen($3.str)+1];
		  strcpy($$->outlined, $3.str);
		}
	| object_spec OUTLINED text
		{
		  $$ = $1;
		  $$->flags |= IS_OUTLINED;
		  $$->outlined = new char[strlen($3.str)+1];
		  strcpy($$->outlined, $3.str);
		}
	| object_spec CHOP
  		{
		  $$ = $1;
		  // line chop chop means line chop 0 chop 0
		  if ($$->flags & IS_DEFAULT_CHOPPED) {
		    $$->flags |= IS_CHOPPED;
		    $$->flags &= ~IS_DEFAULT_CHOPPED;
		    $$->start_chop = $$->end_chop = 0.0;
		  }
		  else if ($$->flags & IS_CHOPPED) {
		    $$->end_chop = 0.0;
		  }
		  else {
		    $$->flags |= IS_DEFAULT_CHOPPED;
		  }
		}
	| object_spec CHOP expr
		{
		  $$ = $1;
		  if ($$->flags & IS_DEFAULT_CHOPPED) {
		    $$->flags |= IS_CHOPPED;
		    $$->flags &= ~IS_DEFAULT_CHOPPED;
		    $$->start_chop = 0.0;
		    $$->end_chop = $3;
		  }
		  else if ($$->flags & IS_CHOPPED) {
		    $$->end_chop = $3;
		  }
		  else {
		    $$->start_chop = $$->end_chop = $3;
		    $$->flags |= IS_CHOPPED;
		  }
		}
	| object_spec SAME
		{
		  $$ = $1;
		  $$->flags |= IS_SAME;
		}
	| object_spec INVISIBLE
		{
		  $$ = $1;
		  $$->flags |= IS_INVISIBLE;
		}
	| object_spec LEFT_ARROW_HEAD
		{
		  $$ = $1;
		  $$->flags |= HAS_LEFT_ARROW_HEAD;
		}
	| object_spec RIGHT_ARROW_HEAD
		{
		  $$ = $1;
		  $$->flags |= HAS_RIGHT_ARROW_HEAD;
		}
	| object_spec DOUBLE_ARROW_HEAD
		{
		  $$ = $1;
		  $$->flags |= (HAS_LEFT_ARROW_HEAD|HAS_RIGHT_ARROW_HEAD);
		}
	| object_spec CW
		{
		  $$ = $1;
		  $$->flags |= IS_CLOCKWISE;
		}
	| object_spec CCW
		{
		  $$ = $1;
		  $$->flags &= ~IS_CLOCKWISE;
		}
	| object_spec text					%prec TEXT
		{
		  $$ = $1;
		  text_item **p;
		  for (p = & $$->text; *p; p = &(*p)->next)
		    ;
		  *p = new text_item($2.str, $2.filename, $2.lineno);
		}
	| object_spec LJUST
		{
		  $$ = $1;
		  if ($$->text) {
		    text_item *p;
		    for (p = $$->text; p->next; p = p->next)
		      ;
		    p->adj.h = LEFT_ADJUST;
		  }
		}
	| object_spec RJUST
		{
		  $$ = $1;
		  if ($$->text) {
		    text_item *p;
		    for (p = $$->text; p->next; p = p->next)
		      ;
		    p->adj.h = RIGHT_ADJUST;
		  }
		}
	| object_spec ABOVE
		{
		  $$ = $1;
		  if ($$->text) {
		    text_item *p;
		    for (p = $$->text; p->next; p = p->next)
		      ;
		    p->adj.v = ABOVE_ADJUST;
		  }
		}
	| object_spec BELOW
		{
		  $$ = $1;
		  if ($$->text) {
		    text_item *p;
		    for (p = $$->text; p->next; p = p->next)
		      ;
		    p->adj.v = BELOW_ADJUST;
		  }
		}
	| object_spec THICKNESS expr
		{
		  $$ = $1;
		  $$->flags |= HAS_THICKNESS;
		  $$->thickness = $3;
		}
	| object_spec ALIGNED
		{
		  $$ = $1;
		  $$->flags |= IS_ALIGNED;
		}
	;

text:
	TEXT
		{ $$ = $1; }
	| SPRINTF '(' TEXT sprintf_args ')'
		{
		  $$.filename = $3.filename;
		  $$.lineno = $3.lineno;
		  $$.str = do_sprintf($3.str, $4.v, $4.nv);
		  a_delete $4.v;
		  a_delete $3.str;
		}
	;

sprintf_args:
	/* empty */
		{
		  $$.v = 0;
		  $$.nv = 0;
		  $$.maxv = 0;
		}
	| sprintf_args ',' expr
		{
		  $$ = $1;
		  if ($$.nv >= $$.maxv) {
		    if ($$.nv == 0) {
		      $$.v = new double[4];
		      $$.maxv = 4;
		    }
		    else {
		      double *oldv = $$.v;
		      $$.maxv *= 2;
		      $$.v = new double[$$.maxv];
		      memcpy($$.v, oldv, $$.nv*sizeof(double));
		      a_delete oldv;
		    }
		  }
		  $$.v[$$.nv] = $3;
		  $$.nv += 1;
		}
	;

position:
  	position_not_place
		{ $$ = $1; }
	| place
  		{
		  position pos = $1;
		  $$.x = pos.x;
		  $$.y = pos.y;
		}
	;

position_not_place:
	expr_pair
		{ $$ = $1; }
	| position '+' expr_pair
		{
		  $$.x = $1.x + $3.x;
		  $$.y = $1.y + $3.y;
		}
	| position '-' expr_pair
		{
		  $$.x = $1.x - $3.x;
		  $$.y = $1.y - $3.y;
		}
	| '(' position ',' position ')'
		{
		  $$.x = $2.x;
		  $$.y = $4.y;
		}
	| expr between position AND position
		{
		  $$.x = (1.0 - $1)*$3.x + $1*$5.x;
		  $$.y = (1.0 - $1)*$3.y + $1*$5.y;
		}
	| expr '<' position ',' position '>'
		{
		  $$.x = (1.0 - $1)*$3.x + $1*$5.x;
		  $$.y = (1.0 - $1)*$3.y + $1*$5.y;
		}
	;

between:
	BETWEEN
	| OF THE WAY BETWEEN
	;

expr_pair:
	expr ',' expr
		{
		  $$.x = $1;
		  $$.y = $3;
		}
	| '(' expr_pair ')'
		{ $$ = $2; }
	;

place:
	/* line at A left == line (at A) left */
	label							%prec CHOP
		{ $$ = $1; }
	| label corner
		{
		  path pth($2);
		  if (!pth.follow($1, & $$))
		    YYABORT;
		}
	| corner label
		{
		  path pth($1);
		  if (!pth.follow($2, & $$))
		    YYABORT;
		}
	| corner OF label
		{
		  path pth($1);
		  if (!pth.follow($3, & $$))
		    YYABORT;
		}
	| HERE
		{
		  $$.x = current_position.x;
		  $$.y = current_position.y;
		  $$.obj = 0;
		}
	;

label:
	LABEL
		{
		  place *p = lookup_label($1);
		  if (!p) {
		    lex_error("there is no place `%1'", $1);
		    YYABORT;
		  }
		  $$ = *p;
		  a_delete $1;
		}
	| nth_primitive
		{ $$.obj = $1; }
	| label '.' LABEL
		{
		  path pth($3);
		  if (!pth.follow($1, & $$))
		    YYABORT;
		}
	;

ordinal:
	ORDINAL
		{ $$ = $1; }
	| '`' any_expr TH
		{
		  // XXX Check for overflow (and non-integers?).
		  $$ = (int)$2;
		}
	;

optional_ordinal_last:
	LAST
		{ $$ = 1; }
  	| ordinal LAST
		{ $$ = $1; }
	;

nth_primitive:
	ordinal object_type
		{
		  int count = 0;
		  object *p;
		  for (p = olist.head; p != 0; p = p->next)
		    if (p->type() == $2 && ++count == $1) {
		      $$ = p;
		      break;
		    }
		  if (p == 0) {
		    lex_error("there is no %1%2 %3", $1, ordinal_postfix($1),
			      object_type_name($2));
		    YYABORT;
		  }
		}
	| optional_ordinal_last object_type
		{
		  int count = 0;
		  object *p;
		  for (p = olist.tail; p != 0; p = p->prev)
		    if (p->type() == $2 && ++count == $1) {
		      $$ = p;
		      break;
		    }
		  if (p == 0) {
		    lex_error("there is no %1%2 last %3", $1,
			      ordinal_postfix($1), object_type_name($2));
		    YYABORT;
		  }
		}
	;

object_type:
	BOX
  		{ $$ = BOX_OBJECT; }
	| CIRCLE
		{ $$ = CIRCLE_OBJECT; }
	| ELLIPSE
		{ $$ = ELLIPSE_OBJECT; }
	| ARC
		{ $$ = ARC_OBJECT; }
	| LINE
		{ $$ = LINE_OBJECT; }
	| ARROW
		{ $$ = ARROW_OBJECT; }
	| SPLINE
		{ $$ = SPLINE_OBJECT; }
	| '[' ']'
		{ $$ = BLOCK_OBJECT; }
	| TEXT
		{ $$ = TEXT_OBJECT; }
	;

label_path:
 	'.' LABEL
		{ $$ = new path($2); }
	| label_path '.' LABEL
		{
		  $$ = $1;
		  $$->append($3);
		}
	;

relative_path:
	corner							%prec CHOP
		{ $$ = new path($1); }
	/* give this a lower precedence than LEFT and RIGHT so that
	   [A: box] with .A left == [A: box] with (.A left) */
  	| label_path						%prec TEXT
		{ $$ = $1; }
	| label_path corner
		{
		  $$ = $1;
		  $$->append($2);
		}
	;

path:
	relative_path
		{ $$ = $1; }
	| '(' relative_path ',' relative_path ')'
		{
		  $$ = $2;
		  $$->set_ypath($4);
		}
	/* The rest of these rules are a compatibility sop. */
	| ORDINAL LAST object_type relative_path
		{
		  lex_warning("`%1%2 last %3' in `with' argument ignored",
			      $1, ordinal_postfix($1), object_type_name($3));
		  $$ = $4;
		}
	| LAST object_type relative_path
		{
		  lex_warning("`last %1' in `with' argument ignored",
			      object_type_name($2));
		  $$ = $3;
		}
	| ORDINAL object_type relative_path
		{
		  lex_warning("`%1%2 %3' in `with' argument ignored",
			      $1, ordinal_postfix($1), object_type_name($2));
		  $$ = $3;
		}
	| LABEL relative_path
		{
		  lex_warning("initial `%1' in `with' argument ignored", $1);
		  a_delete $1;
		  $$ = $2;
		}
	;

corner:
	DOT_N
		{ $$ = &object::north; }
	| DOT_E	
		{ $$ = &object::east; }
	| DOT_W
		{ $$ = &object::west; }
	| DOT_S
		{ $$ = &object::south; }
	| DOT_NE
		{ $$ = &object::north_east; }
	| DOT_SE
		{ $$ = &object:: south_east; }
	| DOT_NW
		{ $$ = &object::north_west; }
	| DOT_SW
		{ $$ = &object::south_west; }
	| DOT_C
		{ $$ = &object::center; }
	| DOT_START
		{ $$ = &object::start; }
	| DOT_END
		{ $$ = &object::end; }
  	| TOP
		{ $$ = &object::north; }
	| BOTTOM
		{ $$ = &object::south; }
	| LEFT
		{ $$ = &object::west; }
	| RIGHT
		{ $$ = &object::east; }
	| UPPER LEFT
		{ $$ = &object::north_west; }
	| LOWER LEFT
		{ $$ = &object::south_west; }
	| UPPER RIGHT
		{ $$ = &object::north_east; }
	| LOWER RIGHT
		{ $$ = &object::south_east; }
	| LEFT_CORNER
		{ $$ = &object::west; }
	| RIGHT_CORNER
		{ $$ = &object::east; }
	| UPPER LEFT_CORNER
		{ $$ = &object::north_west; }
	| LOWER LEFT_CORNER
		{ $$ = &object::south_west; }
	| UPPER RIGHT_CORNER
		{ $$ = &object::north_east; }
	| LOWER RIGHT_CORNER
		{ $$ = &object::south_east; }
	| NORTH
		{ $$ = &object::north; }
	| SOUTH
		{ $$ = &object::south; }
	| EAST
		{ $$ = &object::east; }
	| WEST
		{ $$ = &object::west; }
	| CENTER
		{ $$ = &object::center; }
	| START
		{ $$ = &object::start; }
	| END
		{ $$ = &object::end; }
	;

expr:
	VARIABLE
		{
		  if (!lookup_variable($1, & $$)) {
		    lex_error("there is no variable `%1'", $1);
		    YYABORT;
		  }
		  a_delete $1;
		}
	| NUMBER
		{ $$ = $1; }
	| place DOT_X
  		{
		  if ($1.obj != 0)
		    $$ = $1.obj->origin().x;
		  else
		    $$ = $1.x;
		}			
	| place DOT_Y
		{
		  if ($1.obj != 0)
		    $$ = $1.obj->origin().y;
		  else
		    $$ = $1.y;
		}
	| place DOT_HT
		{
		  if ($1.obj != 0)
		    $$ = $1.obj->height();
		  else
		    $$ = 0.0;
		}
	| place DOT_WID
		{
		  if ($1.obj != 0)
		    $$ = $1.obj->width();
		  else
		    $$ = 0.0;
		}
	| place DOT_RAD
		{
		  if ($1.obj != 0)
		    $$ = $1.obj->radius();
		  else
		    $$ = 0.0;
		}
	| expr '+' expr
		{ $$ = $1 + $3; }
	| expr '-' expr
		{ $$ = $1 - $3; }
	| expr '*' expr
		{ $$ = $1 * $3; }
	| expr '/' expr
		{
		  if ($3 == 0.0) {
		    lex_error("division by zero");
		    YYABORT;
		  }
		  $$ = $1/$3;
		}
	| expr '%' expr
		{
		  if ($3 == 0.0) {
		    lex_error("modulus by zero");
		    YYABORT;
		  }
		  $$ = fmod($1, $3);
		}
	| expr '^' expr
		{
		  errno = 0;
		  $$ = pow($1, $3);
		  if (errno == EDOM) {
		    lex_error("arguments to `^' operator out of domain");
		    YYABORT;
		  }
		  if (errno == ERANGE) {
		    lex_error("result of `^' operator out of range");
		    YYABORT;
		  }
		}
	| '-' expr						%prec '!'
		{ $$ = -$2; }
	| '(' any_expr ')'
		{ $$ = $2; }
	| SIN '(' any_expr ')'
		{
		  errno = 0;
		  $$ = sin($3);
		  if (errno == ERANGE) {
		    lex_error("sin result out of range");
		    YYABORT;
		  }
		}
	| COS '(' any_expr ')'
		{
		  errno = 0;
		  $$ = cos($3);
		  if (errno == ERANGE) {
		    lex_error("cos result out of range");
		    YYABORT;
		  }
		}
	| ATAN2 '(' any_expr ',' any_expr ')'
		{
		  errno = 0;
		  $$ = atan2($3, $5);
		  if (errno == EDOM) {
		    lex_error("atan2 argument out of domain");
		    YYABORT;
		  }
		  if (errno == ERANGE) {
		    lex_error("atan2 result out of range");
		    YYABORT;
		  }
		}
	| LOG '(' any_expr ')'
		{
		  errno = 0;
		  $$ = log10($3);
		  if (errno == ERANGE) {
		    lex_error("log result out of range");
		    YYABORT;
		  }
		}
	| EXP '(' any_expr ')'
		{
		  errno = 0;
		  $$ = pow(10.0, $3);
		  if (errno == ERANGE) {
		    lex_error("exp result out of range");
		    YYABORT;
		  }
		}
	| SQRT '(' any_expr ')'
		{
		  errno = 0;
		  $$ = sqrt($3);
		  if (errno == EDOM) {
		    lex_error("sqrt argument out of domain");
		    YYABORT;
		  }
		}
	| K_MAX '(' any_expr ',' any_expr ')'
		{ $$ = $3 > $5 ? $3 : $5; }
	| K_MIN '(' any_expr ',' any_expr ')'
		{ $$ = $3 < $5 ? $3 : $5; }
	| INT '(' any_expr ')'
		{ $$ = floor($3); }
	| RAND '(' any_expr ')'
		{ $$ = 1.0 + floor(((rand()&0x7fff)/double(0x7fff))*$3); }
	| RAND '(' ')'
		{
		  /* return a random number in the range [0,1) */
		  /* portable, but not very random */
		  $$ = (rand() & 0x7fff) / double(0x8000);
		}
	| SRAND '(' any_expr ')'
		{
		  $$ = 0;
		  srand((unsigned int)$3);
		}
	| expr '<' expr
		{ $$ = ($1 < $3); }
	| expr LESSEQUAL expr
		{ $$ = ($1 <= $3); }
	| expr '>' expr
		{ $$ = ($1 > $3); }
	| expr GREATEREQUAL expr
		{ $$ = ($1 >= $3); }
	| expr EQUALEQUAL expr
		{ $$ = ($1 == $3); }
	| expr NOTEQUAL expr
		{ $$ = ($1 != $3); }
	| expr ANDAND expr
		{ $$ = ($1 != 0.0 && $3 != 0.0); }
	| expr OROR expr
		{ $$ = ($1 != 0.0 || $3 != 0.0); }
	| '!' expr
		{ $$ = ($2 == 0.0); }

	;

%%

/* bison defines const to be empty unless __STDC__ is defined, which it
isn't under cfront */

#ifdef const
#undef const
#endif

static struct {
  const char *name;
  double val;
  int scaled;		     // non-zero if val should be multiplied by scale
} defaults_table[] = {
  { "arcrad", .25, 1 },
  { "arrowht", .1, 1 },
  { "arrowwid", .05, 1 },
  { "circlerad", .25, 1 },
  { "boxht", .5, 1 },
  { "boxwid", .75, 1 },
  { "boxrad", 0.0, 1 },
  { "dashwid", .05, 1 },
  { "ellipseht", .5, 1 },
  { "ellipsewid", .75, 1 },
  { "moveht", .5, 1 },
  { "movewid", .5, 1 },
  { "lineht", .5, 1 },
  { "linewid", .5, 1 },
  { "textht", 0.0, 1 },
  { "textwid", 0.0, 1 },
  { "scale", 1.0, 0 },
  { "linethick", -1.0, 0 },		// in points
  { "fillval", .5, 0 },
  { "arrowhead", 1.0, 0 },
  { "maxpswid", 8.5, 0 },
  { "maxpsht", 11.0, 0 },
};

place *lookup_label(const char *label)
{
  saved_state *state = current_saved_state;
  PTABLE(place) *tbl = current_table;
  for (;;) {
    place *pl = tbl->lookup(label);
    if (pl)
      return pl;
    if (!state)
      return 0;
    tbl = state->tbl;
    state = state->prev;
  }
}

void define_label(const char *label, const place *pl)
{
  place *p = new place[1];
  *p = *pl;
  current_table->define(label, p);
}

int lookup_variable(const char *name, double *val)
{
  place *pl = lookup_label(name);
  if (pl) {
    *val = pl->x;
    return 1;
  }
  return 0;
}

void define_variable(const char *name, double val)
{
  place *p = new place[1];
  p->obj = 0;
  p->x = val;
  p->y = 0.0;
  current_table->define(name, p);
  if (strcmp(name, "scale") == 0) {
    // When the scale changes, reset all scaled pre-defined variables to
    // their default values.
    for (unsigned int i = 0;
	 i < sizeof(defaults_table)/sizeof(defaults_table[0]); i++) 
      if (defaults_table[i].scaled)
	define_variable(defaults_table[i].name, val*defaults_table[i].val);
  }
}

// called once only (not once per parse)

void parse_init()
{
  current_direction = RIGHT_DIRECTION;
  current_position.x = 0.0;
  current_position.y = 0.0;
  // This resets everything to its default value.
  reset_all();
}

void reset(const char *nm)
{
  for (unsigned int i = 0;
       i < sizeof(defaults_table)/sizeof(defaults_table[0]); i++)
    if (strcmp(nm, defaults_table[i].name) == 0) {
      double val = defaults_table[i].val;
      if (defaults_table[i].scaled) {
	double scale;
	lookup_variable("scale", &scale);
	val *= scale;
      }
      define_variable(defaults_table[i].name, val);
      return;
    }
  lex_error("`%1' is not a predefined variable", nm);
}

void reset_all()
{
  // We only have to explicitly reset the pre-defined variables that
  // aren't scaled because `scale' is not scaled, and changing the
  // value of `scale' will reset all the pre-defined variables that
  // are scaled.
  for (unsigned int i = 0;
       i < sizeof(defaults_table)/sizeof(defaults_table[0]); i++)
    if (!defaults_table[i].scaled)
      define_variable(defaults_table[i].name, defaults_table[i].val);
}

// called after each parse

void parse_cleanup()
{
  while (current_saved_state != 0) {
    delete current_table;
    current_table = current_saved_state->tbl;
    saved_state *tem = current_saved_state;
    current_saved_state = current_saved_state->prev;
    delete tem;
  }
  assert(current_table == &top_table);
  PTABLE_ITERATOR(place) iter(current_table);
  const char *key;
  place *pl;
  while (iter.next(&key, &pl))
    if (pl->obj != 0) {
      position pos = pl->obj->origin();
      pl->obj = 0;
      pl->x = pos.x;
      pl->y = pos.y;
    }
  while (olist.head != 0) {
    object *tem = olist.head;
    olist.head = olist.head->next;
    delete tem;
  }
  olist.tail = 0;
  current_direction = RIGHT_DIRECTION;
  current_position.x = 0.0;
  current_position.y = 0.0;
}

const char *ordinal_postfix(int n)
{
  if (n < 10 || n > 20)
    switch (n % 10) {
    case 1:
      return "st";
    case 2:
      return "nd";
    case 3:
      return "rd";
    }
  return "th";
}

const char *object_type_name(object_type type)
{
  switch (type) {
  case BOX_OBJECT:
    return "box";
  case CIRCLE_OBJECT:
    return "circle";
  case ELLIPSE_OBJECT:
    return "ellipse";
  case ARC_OBJECT:
    return "arc";
  case SPLINE_OBJECT:
    return "spline";
  case LINE_OBJECT:
    return "line";
  case ARROW_OBJECT:
    return "arrow";
  case MOVE_OBJECT:
    return "move";
  case TEXT_OBJECT:
    return "\"\"";
  case BLOCK_OBJECT:
    return "[]";
  case OTHER_OBJECT:
  case MARK_OBJECT:
  default:
    break;
  }
  return "object";
}

static char sprintf_buf[1024];

char *format_number(const char *form, double n)
{
  if (form == 0)
    form = "%g";
  return do_sprintf(form, &n, 1);
}

char *do_sprintf(const char *form, const double *v, int nv)
{
  string result;
  int i = 0;
  string one_format;
  while (*form) {
    if (*form == '%') {
      one_format += *form++;
      for (; *form != '\0' && strchr("#-+ 0123456789.", *form) != 0; form++)
	one_format += *form;
      if (*form == '\0' || strchr("eEfgG%", *form) == 0) {
	lex_error("bad sprintf format");
	result += one_format;
	result += form;
	break;
      }
      if (*form == '%') {
	one_format += *form++;
	one_format += '\0';
	snprintf(sprintf_buf, sizeof(sprintf_buf),
		 "%s", one_format.contents());
      }
      else {
	if (i >= nv) {
	  lex_error("too few arguments to snprintf");
	  result += one_format;
	  result += form;
	  break;
	}
	one_format += *form++;
	one_format += '\0';
	snprintf(sprintf_buf, sizeof(sprintf_buf),
		 one_format.contents(), v[i++]);
      }
      one_format.clear();
      result += sprintf_buf;
    }
    else
      result += *form++;
  }
  result += '\0';
  return strsave(result.contents());
}

----Next_Part(Thu_Apr_17_08:27:59_2003_499)----



From MAILER-DAEMON Thu Apr 17 19:12:19 2003
Received: from list by monty-python.gnu.org with archive (Exim 4.10.13)
	id 196IXu-00007o-00
	for mharc-bug-bison@gnu.org; Thu, 17 Apr 2003 19:11:58 -0400
Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.10.13)
	id 196IXa-0008Fg-00
	for bug-bison@gnu.org; Thu, 17 Apr 2003 19:11:38 -0400
Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.10.13)
	id 196IXP-00084M-00
	for bug-bison@gnu.org; Thu, 17 Apr 2003 19:11:28 -0400
Received: from relay2.eecs.berkeley.edu ([169.229.60.28])
	by monty-python.gnu.org with esmtp (Exim 4.10.13)
	id 196IW5-0007lX-00; Thu, 17 Apr 2003 19:10:05 -0400
Received: from relay3.EECS.Berkeley.EDU (localhost [127.0.0.1])
	h3HNA3jE004194;	Thu, 17 Apr 2003 16:10:03 -0700 (PDT)
Received: from tully.CS.Berkeley.EDU (tully.CS.Berkeley.EDU [128.32.153.227])
	h3HNA14B010041;	Thu, 17 Apr 2003 16:10:01 -0700 (PDT)
Received: from tully.CS.Berkeley.EDU (localhost [127.0.0.1])
	h3HNA29W008552;	Thu, 17 Apr 2003 16:10:02 -0700 (PDT)
Received: from tully.CS.Berkeley.EDU (hilfingr@localhost)
	h3HNA2gg008549;	Thu, 17 Apr 2003 16:10:02 -0700 (PDT)
Message-Id: <200304172310.h3HNA2gg008549@tully.CS.Berkeley.EDU>
To: bug-bison@gnu.org
In-Reply-To: Message from Werner LEMBERG <wl@gnu.org> 
	<20030417.082759.71547529.wl@gnu.org> 
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-ID: <8544.1050621001.1@tully.CS.Berkeley.EDU>
Date: Thu, 17 Apr 2003 16:10:01 -0700
From: Paul Hilfinger <hilfingr@EECS.Berkeley.EDU>
cc: Werner LEMBERG <wl@gnu.org>
Subject: Re: problem with groff's pic.y grammar 
X-BeenThere: bug-bison@gnu.org
X-Mailman-Version: 2.1b5
Precedence: list
List-Id: Bug reports for Bison, the GNU parser generator <bug-bison.gnu.org>
List-Help: <mailto:bug-bison-request@gnu.org?subject=help>
List-Post: <mailto:bug-bison@gnu.org>
List-Subscribe: <http://mail.gnu.org/mailman/listinfo/bug-bison>,
	<mailto:bug-bison-request@gnu.org?subject=subscribe>
List-Archive: <http://mail.gnu.org/pipermail/bug-bison>
List-Unsubscribe: <http://mail.gnu.org/mailman/listinfo/bug-bison>,
	<mailto:bug-bison-request@gnu.org?subject=unsubscribe>
X-List-Received-Date: Thu, 17 Apr 2003 23:11:57 -0000


> With byacc, I get a clean
> run.  With bison 1.875, I get 8 shift/reduce conflicts, and the
> resulting output doesn't work at all.  How is this possible?

Unless I am greatly mistaken, the problem here is in set_conflicts 
(conflicts.c), where there is a loop:

  /* Loop over all rules which require lookahead in this state.  First
     check for shift-reduce conflict, and try to resolve using
     precedence.  */
  for (i = 0; i < reds->num; ++i)
    if (reds->rules[i]->prec && reds->rules[i]->prec->prec
	&& !bitset_disjoint_p (reds->lookaheads[i], lookaheadset))
      {
	resolve_sr_conflict (s, i, errors);
	break;
      }

which should probably be something like

  /* Loop over all rules which require lookahead in this state.  First
     check for shift-reduce conflict, and try to resolve using
     precedence.  */
  for (i = 0; i < reds->num; ++i)
    if (reds->rules[i]->prec && reds->rules[i]->prec->prec
	&& !bitset_disjoint_p (reds->lookaheads[i], lookaheadset))
      resolve_sr_conflict (s, i, errors);

to judge from the code that used to be here, viz.:

  for (i = state_table[state].lookaheads;
       i < state_table[state + 1].lookaheads;
       ++i)
    if (rule_table[LAruleno[i]].prec)
      for (j = 0; j < tokensetsize; ++j)
	if (LA (i)[j] & lookaheadset[j])
	  {
	    resolve_sr_conflict (state, i);
	    break;
	  }


Alas, I do not have the leisure to test this thoroughly at the moment,
but perhaps this will be of use to those who do.

Paul Hilfinger



From MAILER-DAEMON Fri Apr 18 01:17:02 2003
Received: from list by monty-python.gnu.org with archive (Exim 4.10.13)
	id 196OF9-0003iE-00
	for mharc-bug-bison@gnu.org; Fri, 18 Apr 2003 01:16:59 -0400
Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.10.13)
	id 196OEu-00034E-00
	for bug-bison@gnu.org; Fri, 18 Apr 2003 01:16:44 -0400
Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.10.13)
	id 196OET-0002Tj-00
	for bug-bison@gnu.org; Fri, 18 Apr 2003 01:16:21 -0400
Received: from kiwi.cs.ucla.edu ([131.179.128.19])
	by monty-python.gnu.org with esmtp (Exim 4.10.13)
	id 196OER-0002DN-00; Fri, 18 Apr 2003 01:16:15 -0400
Received: (from eggert@localhost)
	by kiwi.cs.ucla.edu (8.11.7+Sun/8.11.6/UCLACS-5.2) id h3I5G6h03071;
	Thu, 17 Apr 2003 22:16:06 -0700 (PDT)
To: Paul Hilfinger <hilfingr@eecs.berkeley.edu>
References: <200304172310.h3HNA2gg008549@tully.CS.Berkeley.EDU>
From: Paul Eggert <eggert@CS.UCLA.EDU>
Date: 17 Apr 2003 22:16:06 -0700
In-Reply-To: <200304172310.h3HNA2gg008549@tully.CS.Berkeley.EDU>
Message-ID: <vi88yu8tmg9.fsf@cs.ucla.edu>
Lines: 1622
User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.3
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
cc: bug-bison@gnu.org
cc: bison-patches@gnu.org
cc: Werner LEMBERG <wl@gnu.org>
Subject: Re: problem with groff's pic.y grammar
X-BeenThere: bug-bison@gnu.org
X-Mailman-Version: 2.1b5
Precedence: list
List-Id: Bug reports for Bison, the GNU parser generator <bug-bison.gnu.org>
List-Help: <mailto:bug-bison-request@gnu.org?subject=help>
List-Post: <mailto:bug-bison@gnu.org>
List-Subscribe: <http://mail.gnu.org/mailman/listinfo/bug-bison>,
	<mailto:bug-bison-request@gnu.org?subject=subscribe>
List-Archive: <http://mail.gnu.org/pipermail/bug-bison>
List-Unsubscribe: <http://mail.gnu.org/mailman/listinfo/bug-bison>,
	<mailto:bug-bison-request@gnu.org?subject=unsubscribe>
X-List-Received-Date: Fri, 18 Apr 2003 05:16:58 -0000

Paul Hilfinger <hilfingr@eecs.berkeley.edu> writes:

> Alas, I do not have the leisure to test this thoroughly at the moment,
> but perhaps this will be of use to those who do.

It sure is.  Thanks.  And thanks to Werner Lemberg for reporting the
problem.  I installed this fix.

2003-04-17  Paul Eggert  <eggert@twinsun.com>

	* src/conflicts.c (set_conflicts): Resolve all conflicts, not just
	the first one.  This change is from Paul Hilfinger, and it fixes
	the regression reported by Werner Lemberg in
	<http://mail.gnu.org/archive/html/bug-bison/2003-04/msg00026.html>.

	(resolve_sr_conflict): Don't invoke state_errs_set
	unless one or more tokens have been explicitly made errors.
	Otherwise, the above change causes Bison to abort.

	* tests/existing.at (GNU pic Grammar): New test case, taken from
	Lemberg's email.

Index: src/conflicts.c
===================================================================
RCS file: /cvsroot/bison/bison/src/conflicts.c,v
retrieving revision 1.103
diff -p -u -r1.103 conflicts.c
--- src/conflicts.c	13 Jan 2003 06:41:28 -0000	1.103
+++ src/conflicts.c	18 Apr 2003 05:00:39 -0000
@@ -237,9 +237,12 @@ resolve_sr_conflict (state *s, int rulen
 	    }
       }
 
-  /* Some tokens have been explicitly made errors.  Allocate a
-     permanent errs structure for this state, to record them.  */
-  state_errs_set (s, nerrs, errors);
+  if (nerrs)
+    {
+      /* Some tokens have been explicitly made errors.  Allocate a
+	 permanent errs structure for this state, to record them.  */
+      state_errs_set (s, nerrs, errors);
+    }
 
   if (obstack_object_size (&solved_conflicts_obstack))
     {
@@ -277,10 +280,7 @@ set_conflicts (state *s, symbol **errors
   for (i = 0; i < reds->num; ++i)
     if (reds->rules[i]->prec && reds->rules[i]->prec->prec
 	&& !bitset_disjoint_p (reds->lookaheads[i], lookaheadset))
-      {
-	resolve_sr_conflict (s, i, errors);
-	break;
-      }
+      resolve_sr_conflict (s, i, errors);
 
   /* Loop over all rules which require lookahead in this state.  Check
      for conflicts not resolved above.  */
Index: tests/existing.at
===================================================================
RCS file: /cvsroot/bison/bison/tests/existing.at,v
retrieving revision 1.4
diff -p -u -r1.4 existing.at
--- tests/existing.at	29 Dec 2002 01:59:40 -0000	1.4
+++ tests/existing.at	18 Apr 2003 05:00:39 -0000
@@ -1,5 +1,7 @@
 # Exercising Bison on actual grammars.                   -*- Autotest -*-
-# Copyright (C) 2002 Free Software Foundation, Inc.
+
+# Copyright (C) 1989, 1990, 1991, 1992, 2000, 2001, 2002, 2003
+# Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -1205,5 +1207,1547 @@ State 356 conflicts: 1 shift/reduce
 State 360 conflicts: 9 shift/reduce, 2 reduce/reduce
 State 427 conflicts: 9 shift/reduce, 2 reduce/reduce
 ]])
+
+AT_CLEANUP
+
+
+## ----------------- ##
+## GNU pic Grammar.  ##
+## ----------------- ##
+
+AT_SETUP([GNU pic Grammar])
+
+# GNU pic, part of groff.
+
+# Bison once reported shift/reduce conflicts that it shouldn't have.
+
+AT_DATA([[input.y]],
+[[%union {
+	char *str;
+	int n;
+	double x;
+	struct { double x, y; } pair;
+	struct { double x; char *body; } if_data;
+	struct { char *str; const char *filename; int lineno; } lstr;
+	struct { double *v; int nv; int maxv; } dv;
+	struct { double val; int is_multiplicative; } by;
+	place pl;
+	object *obj;
+	corner crn;
+	path *pth;
+	object_spec *spec;
+	saved_state *pstate;
+	graphics_state state;
+	object_type obtype;
+}
+
+%token <str> LABEL
+%token <str> VARIABLE
+%token <x> NUMBER
+%token <lstr> TEXT
+%token <lstr> COMMAND_LINE
+%token <str> DELIMITED
+%token <n> ORDINAL
+%token TH
+%token LEFT_ARROW_HEAD
+%token RIGHT_ARROW_HEAD
+%token DOUBLE_ARROW_HEAD
+%token LAST
+%token UP
+%token DOWN
+%token LEFT
+%token RIGHT
+%token BOX
+%token CIRCLE
+%token ELLIPSE
+%token ARC
+%token LINE
+%token ARROW
+%token MOVE
+%token SPLINE
+%token HEIGHT
+%token RADIUS
+%token WIDTH
+%token DIAMETER
+%token FROM
+%token TO
+%token AT
+%token WITH
+%token BY
+%token THEN
+%token SOLID
+%token DOTTED
+%token DASHED
+%token CHOP
+%token SAME
+%token INVISIBLE
+%token LJUST
+%token RJUST
+%token ABOVE
+%token BELOW
+%token OF
+%token THE
+%token WAY
+%token BETWEEN
+%token AND
+%token HERE
+%token DOT_N
+%token DOT_E	
+%token DOT_W
+%token DOT_S
+%token DOT_NE
+%token DOT_SE
+%token DOT_NW
+%token DOT_SW
+%token DOT_C
+%token DOT_START
+%token DOT_END
+%token DOT_X
+%token DOT_Y
+%token DOT_HT
+%token DOT_WID
+%token DOT_RAD
+%token SIN
+%token COS
+%token ATAN2
+%token LOG
+%token EXP
+%token SQRT
+%token K_MAX
+%token K_MIN
+%token INT
+%token RAND
+%token SRAND
+%token COPY
+%token THRU
+%token TOP
+%token BOTTOM
+%token UPPER
+%token LOWER
+%token SH
+%token PRINT
+%token CW
+%token CCW
+%token FOR
+%token DO
+%token IF
+%token ELSE
+%token ANDAND
+%token OROR
+%token NOTEQUAL
+%token EQUALEQUAL
+%token LESSEQUAL
+%token GREATEREQUAL
+%token LEFT_CORNER
+%token RIGHT_CORNER
+%token NORTH
+%token SOUTH
+%token EAST
+%token WEST
+%token CENTER
+%token END
+%token START
+%token RESET
+%token UNTIL
+%token PLOT
+%token THICKNESS
+%token FILL
+%token COLORED
+%token OUTLINED
+%token SHADED
+%token ALIGNED
+%token SPRINTF
+%token COMMAND
+
+%left '.'
+
+/* this ensures that plot 17 "%g" parses as (plot 17 "%g") */
+%left PLOT
+%left TEXT SPRINTF
+
+/* give text adjustments higher precedence than TEXT, so that
+box "foo" above ljust == box ("foo" above ljust)
+*/
+
+%left LJUST RJUST ABOVE BELOW
+
+%left LEFT RIGHT
+/* Give attributes that take an optional expression a higher
+precedence than left and right, so that eg `line chop left'
+parses properly. */
+%left CHOP SOLID DASHED DOTTED UP DOWN FILL COLORED OUTLINED
+%left LABEL
+
+%left VARIABLE NUMBER '(' SIN COS ATAN2 LOG EXP SQRT K_MAX K_MIN INT RAND SRAND LAST 
+%left ORDINAL HERE '`'
+
+%left BOX CIRCLE ELLIPSE ARC LINE ARROW SPLINE '[' /* ] */
+
+/* these need to be lower than '-' */
+%left HEIGHT RADIUS WIDTH DIAMETER FROM TO AT THICKNESS
+
+/* these must have higher precedence than CHOP so that `label %prec CHOP'
+works */
+%left DOT_N DOT_E DOT_W DOT_S DOT_NE DOT_SE DOT_NW DOT_SW DOT_C
+%left DOT_START DOT_END TOP BOTTOM LEFT_CORNER RIGHT_CORNER
+%left UPPER LOWER NORTH SOUTH EAST WEST CENTER START END
+
+%left ','
+%left OROR
+%left ANDAND
+%left EQUALEQUAL NOTEQUAL
+%left '<' '>' LESSEQUAL GREATEREQUAL
+
+%left BETWEEN OF
+%left AND
+
+%left '+' '-'
+%left '*' '/' '%'
+%right '!'
+%right '^'
+
+%type <x> expr any_expr text_expr
+%type <by> optional_by
+%type <pair> expr_pair position_not_place
+%type <if_data> simple_if
+%type <obj> nth_primitive
+%type <crn> corner
+%type <pth> path label_path relative_path
+%type <pl> place label element element_list middle_element_list
+%type <spec> object_spec
+%type <pair> position
+%type <obtype> object_type
+%type <n> optional_ordinal_last ordinal
+%type <str> until
+%type <dv> sprintf_args
+%type <lstr> text print_args print_arg
+
+%%
+
+top:
+	optional_separator
+	| element_list
+		{
+		  if (olist.head)
+		    print_picture(olist.head);
+		}
+	;
+
+
+element_list:
+	optional_separator middle_element_list optional_separator
+		{ $$ = $2; }
+	;
+
+middle_element_list:
+	element
+		{ $$ = $1; }
+	| middle_element_list separator element
+		{ $$ = $1; }
+	;
+
+optional_separator:
+	/* empty */
+	| separator
+	;
+
+separator:
+	';'
+	| separator ';'
+	;
+
+placeless_element:
+	VARIABLE '=' any_expr
+		{
+		  define_variable($1, $3);
+		  a_delete $1;
+		}
+	| VARIABLE ':' '=' any_expr
+		{
+		  place *p = lookup_label($1);
+		  if (!p) {
+		    lex_error("variable `%1' not defined", $1);
+		    YYABORT;
+		  }
+		  p->obj = 0;
+		  p->x = $4;
+		  p->y = 0.0;
+		  a_delete $1;
+		}
+	| UP
+		{ current_direction = UP_DIRECTION; }
+	| DOWN
+		{ current_direction = DOWN_DIRECTION; }
+	| LEFT
+		{ current_direction = LEFT_DIRECTION; }
+	| RIGHT
+		{ current_direction = RIGHT_DIRECTION; }
+	| COMMAND_LINE
+		{
+		  olist.append(make_command_object($1.str, $1.filename,
+						   $1.lineno));
+		}
+	| COMMAND print_args
+		{
+		  olist.append(make_command_object($2.str, $2.filename,
+						   $2.lineno));
+		}
+	| PRINT print_args
+		{
+		  fprintf(stderr, "%s\n", $2.str);
+		  a_delete $2.str;
+		  fflush(stderr);
+		}
+	| SH
+		{ delim_flag = 1; }
+	  DELIMITED
+		{
+		  delim_flag = 0;
+		  if (safer_flag)
+		    lex_error("unsafe to run command `%1'", $3);
+		  else
+		    system($3);
+		  a_delete $3;
+		}
+	| COPY TEXT
+		{
+		  if (yychar < 0)
+		    do_lookahead();
+		  do_copy($2.str);
+		  // do not delete the filename
+		}
+	| COPY TEXT THRU
+		{ delim_flag = 2; }
+	  DELIMITED 
+		{ delim_flag = 0; }
+	  until
+		{
+		  if (yychar < 0)
+		    do_lookahead();
+		  copy_file_thru($2.str, $5, $7);
+		  // do not delete the filename
+		  a_delete $5;
+		  a_delete $7;
+		}
+	| COPY THRU
+		{ delim_flag = 2; }
+	  DELIMITED
+		{ delim_flag = 0; }
+	  until
+		{
+		  if (yychar < 0)
+		    do_lookahead();
+		  copy_rest_thru($4, $6);
+		  a_delete $4;
+		  a_delete $6;
+		}
+	| FOR VARIABLE '=' expr TO expr optional_by DO
+	  	{ delim_flag = 1; }
+	  DELIMITED
+	  	{
+		  delim_flag = 0;
+		  if (yychar < 0)
+		    do_lookahead();
+		  do_for($2, $4, $6, $7.is_multiplicative, $7.val, $10); 
+		}
+	| simple_if
+		{
+		  if (yychar < 0)
+		    do_lookahead();
+		  if ($1.x != 0.0)
+		    push_body($1.body);
+		  a_delete $1.body;
+		}
+	| simple_if ELSE
+		{ delim_flag = 1; }
+	  DELIMITED
+		{
+		  delim_flag = 0;
+		  if (yychar < 0)
+		    do_lookahead();
+		  if ($1.x != 0.0)
+		    push_body($1.body);
+		  else
+		    push_body($4);
+		  a_delete $1.body;
+		  a_delete $4;
+		}
+	| reset_variables
+	| RESET
+		{ define_variable("scale", 1.0); }
+	;
+
+reset_variables:
+	RESET VARIABLE
+		{
+		  reset($2);
+		  a_delete $2;
+		}
+	| reset_variables VARIABLE
+		{
+		  reset($2);
+		  a_delete $2;
+		}
+	| reset_variables ',' VARIABLE
+		{
+		  reset($3);
+		  a_delete $3;
+		}
+	;
+
+print_args:
+	print_arg
+		{ $$ = $1; }
+	| print_args print_arg
+		{
+		  $$.str = new char[strlen($1.str) + strlen($2.str) + 1];
+		  strcpy($$.str, $1.str);
+		  strcat($$.str, $2.str);
+		  a_delete $1.str;
+		  a_delete $2.str;
+		  if ($1.filename) {
+		    $$.filename = $1.filename;
+		    $$.lineno = $1.lineno;
+		  }
+		  else if ($2.filename) {
+		    $$.filename = $2.filename;
+		    $$.lineno = $2.lineno;
+		  }
+		}
+	;
+
+print_arg:
+  	expr							%prec ','
+		{
+		  $$.str = new char[GDIGITS + 1];
+		  sprintf($$.str, "%g", $1);
+		  $$.filename = 0;
+		  $$.lineno = 0;
+		}
+	| text
+		{ $$ = $1; }
+	| position						%prec ','
+		{
+		  $$.str = new char[GDIGITS + 2 + GDIGITS + 1];
+		  sprintf($$.str, "%g, %g", $1.x, $1.y);
+		  $$.filename = 0;
+		  $$.lineno = 0;
+		}
+	;
+
+simple_if:
+	IF any_expr THEN
+		{ delim_flag = 1; }
+	DELIMITED
+		{
+		  delim_flag = 0;
+		  $$.x = $2;
+		  $$.body = $5;
+		}
+	;
+
+until:
+	/* empty */
+		{ $$ = 0; }
+	| UNTIL TEXT
+		{ $$ = $2.str; }
+	;
+	
+any_expr:
+	expr
+		{ $$ = $1; }
+	| text_expr
+		{ $$ = $1; }
+	;
+	
+text_expr:
+	text EQUALEQUAL text
+		{
+		  $$ = strcmp($1.str, $3.str) == 0;
+		  a_delete $1.str;
+		  a_delete $3.str;
+		}
+	| text NOTEQUAL text
+		{
+		  $$ = strcmp($1.str, $3.str) != 0;
+		  a_delete $1.str;
+		  a_delete $3.str;
+		}
+	| text_expr ANDAND text_expr
+		{ $$ = ($1 != 0.0 && $3 != 0.0); }
+	| text_expr ANDAND expr
+		{ $$ = ($1 != 0.0 && $3 != 0.0); }
+	| expr ANDAND text_expr
+		{ $$ = ($1 != 0.0 && $3 != 0.0); }
+	| text_expr OROR text_expr
+		{ $$ = ($1 != 0.0 || $3 != 0.0); }
+	| text_expr OROR expr
+		{ $$ = ($1 != 0.0 || $3 != 0.0); }
+	| expr OROR text_expr
+		{ $$ = ($1 != 0.0 || $3 != 0.0); }
+	| '!' text_expr
+		{ $$ = ($2 == 0.0); }
+	;
+
+
+optional_by:
+	/* empty */
+		{
+		  $$.val = 1.0;
+		  $$.is_multiplicative = 0;
+		}
+	| BY expr
+		{
+		  $$.val = $2;
+		  $$.is_multiplicative = 0;
+		}
+	| BY '*' expr
+		{
+		  $$.val = $3;
+		  $$.is_multiplicative = 1;
+		}
+	;
+
+element:
+	object_spec
+		{
+		  $$.obj = $1->make_object(&current_position,
+					   &current_direction);
+		  if ($$.obj == 0)
+		    YYABORT;
+		  delete $1;
+		  if ($$.obj)
+		    olist.append($$.obj);
+		  else {
+		    $$.x = current_position.x;
+		    $$.y = current_position.y;
+		  }
+		}
+	| LABEL ':' optional_separator element
+		{
+		  $$ = $4;
+		  define_label($1, & $$);
+		  a_delete $1;
+		}
+	| LABEL ':' optional_separator position_not_place
+		{
+		  $$.obj = 0;
+		  $$.x = $4.x;
+		  $$.y = $4.y;
+		  define_label($1, & $$);
+		  a_delete $1;
+		}
+	| LABEL ':' optional_separator place
+		{
+		  $$ = $4;
+		  define_label($1, & $$);
+		  a_delete $1;
+		}
+	| '{'
+		{
+		  $<state>$.x = current_position.x;
+		  $<state>$.y = current_position.y;
+		  $<state>$.dir = current_direction;
+		}
+	  element_list '}'
+		{
+		  current_position.x = $<state>2.x;
+		  current_position.y = $<state>2.y;
+		  current_direction = $<state>2.dir;
+		}
+	  optional_element
+		{
+		  $$ = $3;
+		}
+	| placeless_element
+		{
+		  $$.obj = 0;
+		  $$.x = current_position.x;
+		  $$.y = current_position.y;
+		}
+	;
+
+optional_element:
+	/* empty */
+		{}
+	| element
+		{}
+	;
+
+object_spec:
+	BOX
+		{ $$ = new object_spec(BOX_OBJECT); }
+	| CIRCLE
+		{ $$ = new object_spec(CIRCLE_OBJECT); }
+	| ELLIPSE
+		{ $$ = new object_spec(ELLIPSE_OBJECT); }
+	| ARC
+		{
+		  $$ = new object_spec(ARC_OBJECT);
+		  $$->dir = current_direction;
+		}
+	| LINE
+		{
+		  $$ = new object_spec(LINE_OBJECT);
+		  lookup_variable("lineht", & $$->segment_height);
+		  lookup_variable("linewid", & $$->segment_width);
+		  $$->dir = current_direction;
+		}
+	| ARROW
+		{
+		  $$ = new object_spec(ARROW_OBJECT);
+		  lookup_variable("lineht", & $$->segment_height);
+		  lookup_variable("linewid", & $$->segment_width);
+		  $$->dir = current_direction;
+		}
+	| MOVE
+		{
+		  $$ = new object_spec(MOVE_OBJECT);
+		  lookup_variable("moveht", & $$->segment_height);
+		  lookup_variable("movewid", & $$->segment_width);
+		  $$->dir = current_direction;
+		}
+	| SPLINE
+		{
+		  $$ = new object_spec(SPLINE_OBJECT);
+		  lookup_variable("lineht", & $$->segment_height);
+		  lookup_variable("linewid", & $$->segment_width);
+		  $$->dir = current_direction;
+		}
+	| text							%prec TEXT
+		{
+		  $$ = new object_spec(TEXT_OBJECT);
+		  $$->text = new text_item($1.str, $1.filename, $1.lineno);
+		}
+	| PLOT expr
+		{
+		  $$ = new object_spec(TEXT_OBJECT);
+		  $$->text = new text_item(format_number(0, $2), 0, -1);
+		}
+	| PLOT expr text
+		{
+		  $$ = new object_spec(TEXT_OBJECT);
+		  $$->text = new text_item(format_number($3.str, $2),
+					   $3.filename, $3.lineno);
+		  a_delete $3.str;
+		}
+	| '[' 
+		{
+		  saved_state *p = new saved_state;
+		  $<pstate>$ = p;
+		  p->x = current_position.x;
+		  p->y = current_position.y;
+		  p->dir = current_direction;
+		  p->tbl = current_table;
+		  p->prev = current_saved_state;
+		  current_position.x = 0.0;
+		  current_position.y = 0.0;
+		  current_table = new PTABLE(place);
+		  current_saved_state = p;
+		  olist.append(make_mark_object());
+		}
+	  element_list ']'
+		{
+		  current_position.x = $<pstate>2->x;
+		  current_position.y = $<pstate>2->y;
+		  current_direction = $<pstate>2->dir;
+		  $$ = new object_spec(BLOCK_OBJECT);
+		  olist.wrap_up_block(& $$->oblist);
+		  $$->tbl = current_table;
+		  current_table = $<pstate>2->tbl;
+		  current_saved_state = $<pstate>2->prev;
+		  delete $<pstate>2;
+		}
+	| object_spec HEIGHT expr
+		{
+		  $$ = $1;
+		  $$->height = $3;
+		  $$->flags |= HAS_HEIGHT;
+		}
+	| object_spec RADIUS expr
+		{
+		  $$ = $1;
+		  $$->radius = $3;
+		  $$->flags |= HAS_RADIUS;
+		}
+	| object_spec WIDTH expr
+		{
+		  $$ = $1;
+		  $$->width = $3;
+		  $$->flags |= HAS_WIDTH;
+		}
+	| object_spec DIAMETER expr
+		{
+		  $$ = $1;
+		  $$->radius = $3/2.0;
+		  $$->flags |= HAS_RADIUS;
+		}
+	| object_spec expr					%prec HEIGHT
+		{
+		  $$ = $1;
+		  $$->flags |= HAS_SEGMENT;
+		  switch ($$->dir) {
+		  case UP_DIRECTION:
+		    $$->segment_pos.y += $2;
+		    break;
+		  case DOWN_DIRECTION:
+		    $$->segment_pos.y -= $2;
+		    break;
+		  case RIGHT_DIRECTION:
+		    $$->segment_pos.x += $2;
+		    break;
+		  case LEFT_DIRECTION:
+		    $$->segment_pos.x -= $2;
+		    break;
+		  }
+		}
+	| object_spec UP
+		{
+		  $$ = $1;
+		  $$->dir = UP_DIRECTION;
+		  $$->flags |= HAS_SEGMENT;
+		  $$->segment_pos.y += $$->segment_height;
+		}
+	| object_spec UP expr
+		{
+		  $$ = $1;
+		  $$->dir = UP_DIRECTION;
+		  $$->flags |= HAS_SEGMENT;
+		  $$->segment_pos.y += $3;
+		}
+	| object_spec DOWN
+		{
+		  $$ = $1;
+		  $$->dir = DOWN_DIRECTION;
+		  $$->flags |= HAS_SEGMENT;
+		  $$->segment_pos.y -= $$->segment_height;
+		}
+	| object_spec DOWN expr
+		{
+		  $$ = $1;
+		  $$->dir = DOWN_DIRECTION;
+		  $$->flags |= HAS_SEGMENT;
+		  $$->segment_pos.y -= $3;
+		}
+	| object_spec RIGHT
+		{
+		  $$ = $1;
+		  $$->dir = RIGHT_DIRECTION;
+		  $$->flags |= HAS_SEGMENT;
+		  $$->segment_pos.x += $$->segment_width;
+		}
+	| object_spec RIGHT expr
+		{
+		  $$ = $1;
+		  $$->dir = RIGHT_DIRECTION;
+		  $$->flags |= HAS_SEGMENT;
+		  $$->segment_pos.x += $3;
+		}
+	| object_spec LEFT
+		{
+		  $$ = $1;
+		  $$->dir = LEFT_DIRECTION;
+		  $$->flags |= HAS_SEGMENT;
+		  $$->segment_pos.x -= $$->segment_width;
+		}
+	| object_spec LEFT expr
+		{
+		  $$ = $1;
+		  $$->dir = LEFT_DIRECTION;
+		  $$->flags |= HAS_SEGMENT;
+		  $$->segment_pos.x -= $3;
+		}
+	| object_spec FROM position
+		{
+		  $$ = $1;
+		  $$->flags |= HAS_FROM;
+		  $$->from.x = $3.x;
+		  $$->from.y = $3.y;
+		}
+	| object_spec TO position
+		{
+		  $$ = $1;
+		  if ($$->flags & HAS_SEGMENT)
+		    $$->segment_list = new segment($$->segment_pos,
+						   $$->segment_is_absolute,
+						   $$->segment_list);
+		  $$->flags |= HAS_SEGMENT;
+		  $$->segment_pos.x = $3.x;
+		  $$->segment_pos.y = $3.y;
+		  $$->segment_is_absolute = 1;
+		  $$->flags |= HAS_TO;
+		  $$->to.x = $3.x;
+		  $$->to.y = $3.y;
+		}
+	| object_spec AT position
+		{
+		  $$ = $1;
+		  $$->flags |= HAS_AT;
+		  $$->at.x = $3.x;
+		  $$->at.y = $3.y;
+		  if ($$->type != ARC_OBJECT) {
+		    $$->flags |= HAS_FROM;
+		    $$->from.x = $3.x;
+		    $$->from.y = $3.y;
+		  }
+		}
+	| object_spec WITH path
+		{
+		  $$ = $1;
+		  $$->flags |= HAS_WITH;
+		  $$->with = $3;
+		}
+	| object_spec WITH position				%prec ','
+		{
+		  $$ = $1;
+		  $$->flags |= HAS_WITH;
+		  position pos;
+		  pos.x = $3.x;
+		  pos.y = $3.y;
+		  $$->with = new path(pos);
+		}
+	| object_spec BY expr_pair
+		{
+		  $$ = $1;
+		  $$->flags |= HAS_SEGMENT;
+		  $$->segment_pos.x += $3.x;
+		  $$->segment_pos.y += $3.y;
+		}
+	| object_spec THEN
+  		{
+		  $$ = $1;
+		  if ($$->flags & HAS_SEGMENT) {
+		    $$->segment_list = new segment($$->segment_pos,
+						   $$->segment_is_absolute,
+						   $$->segment_list);
+		    $$->flags &= ~HAS_SEGMENT;
+		    $$->segment_pos.x = $$->segment_pos.y = 0.0;
+		    $$->segment_is_absolute = 0;
+		  }
+		}
+	| object_spec SOLID
+		{
+		  $$ = $1;	// nothing
+		}
+	| object_spec DOTTED
+		{
+		  $$ = $1;
+		  $$->flags |= IS_DOTTED;
+		  lookup_variable("dashwid", & $$->dash_width);
+		}
+	| object_spec DOTTED expr
+		{
+		  $$ = $1;
+		  $$->flags |= IS_DOTTED;
+		  $$->dash_width = $3;
+		}
+	| object_spec DASHED
+		{
+		  $$ = $1;
+		  $$->flags |= IS_DASHED;
+		  lookup_variable("dashwid", & $$->dash_width);
+		}
+	| object_spec DASHED expr
+		{
+		  $$ = $1;
+		  $$->flags |= IS_DASHED;
+		  $$->dash_width = $3;
+		}
+	| object_spec FILL
+		{
+		  $$ = $1;
+		  $$->flags |= IS_DEFAULT_FILLED;
+		}
+	| object_spec FILL expr
+		{
+		  $$ = $1;
+		  $$->flags |= IS_FILLED;
+		  $$->fill = $3;
+		}
+	| object_spec SHADED text
+		{
+		  $$ = $1;
+		  $$->flags |= (IS_SHADED | IS_FILLED);
+		  $$->shaded = new char[strlen($3.str)+1];
+		  strcpy($$->shaded, $3.str);
+		}
+	| object_spec COLORED text
+		{
+		  $$ = $1;
+		  $$->flags |= (IS_SHADED | IS_OUTLINED | IS_FILLED);
+		  $$->shaded = new char[strlen($3.str)+1];
+		  strcpy($$->shaded, $3.str);
+		  $$->outlined = new char[strlen($3.str)+1];
+		  strcpy($$->outlined, $3.str);
+		}
+	| object_spec OUTLINED text
+		{
+		  $$ = $1;
+		  $$->flags |= IS_OUTLINED;
+		  $$->outlined = new char[strlen($3.str)+1];
+		  strcpy($$->outlined, $3.str);
+		}
+	| object_spec CHOP
+  		{
+		  $$ = $1;
+		  // line chop chop means line chop 0 chop 0
+		  if ($$->flags & IS_DEFAULT_CHOPPED) {
+		    $$->flags |= IS_CHOPPED;
+		    $$->flags &= ~IS_DEFAULT_CHOPPED;
+		    $$->start_chop = $$->end_chop = 0.0;
+		  }
+		  else if ($$->flags & IS_CHOPPED) {
+		    $$->end_chop = 0.0;
+		  }
+		  else {
+		    $$->flags |= IS_DEFAULT_CHOPPED;
+		  }
+		}
+	| object_spec CHOP expr
+		{
+		  $$ = $1;
+		  if ($$->flags & IS_DEFAULT_CHOPPED) {
+		    $$->flags |= IS_CHOPPED;
+		    $$->flags &= ~IS_DEFAULT_CHOPPED;
+		    $$->start_chop = 0.0;
+		    $$->end_chop = $3;
+		  }
+		  else if ($$->flags & IS_CHOPPED) {
+		    $$->end_chop = $3;
+		  }
+		  else {
+		    $$->start_chop = $$->end_chop = $3;
+		    $$->flags |= IS_CHOPPED;
+		  }
+		}
+	| object_spec SAME
+		{
+		  $$ = $1;
+		  $$->flags |= IS_SAME;
+		}
+	| object_spec INVISIBLE
+		{
+		  $$ = $1;
+		  $$->flags |= IS_INVISIBLE;
+		}
+	| object_spec LEFT_ARROW_HEAD
+		{
+		  $$ = $1;
+		  $$->flags |= HAS_LEFT_ARROW_HEAD;
+		}
+	| object_spec RIGHT_ARROW_HEAD
+		{
+		  $$ = $1;
+		  $$->flags |= HAS_RIGHT_ARROW_HEAD;
+		}
+	| object_spec DOUBLE_ARROW_HEAD
+		{
+		  $$ = $1;
+		  $$->flags |= (HAS_LEFT_ARROW_HEAD|HAS_RIGHT_ARROW_HEAD);
+		}
+	| object_spec CW
+		{
+		  $$ = $1;
+		  $$->flags |= IS_CLOCKWISE;
+		}
+	| object_spec CCW
+		{
+		  $$ = $1;
+		  $$->flags &= ~IS_CLOCKWISE;
+		}
+	| object_spec text					%prec TEXT
+		{
+		  $$ = $1;
+		  text_item **p;
+		  for (p = & $$->text; *p; p = &(*p)->next)
+		    ;
+		  *p = new text_item($2.str, $2.filename, $2.lineno);
+		}
+	| object_spec LJUST
+		{
+		  $$ = $1;
+		  if ($$->text) {
+		    text_item *p;
+		    for (p = $$->text; p->next; p = p->next)
+		      ;
+		    p->adj.h = LEFT_ADJUST;
+		  }
+		}
+	| object_spec RJUST
+		{
+		  $$ = $1;
+		  if ($$->text) {
+		    text_item *p;
+		    for (p = $$->text; p->next; p = p->next)
+		      ;
+		    p->adj.h = RIGHT_ADJUST;
+		  }
+		}
+	| object_spec ABOVE
+		{
+		  $$ = $1;
+		  if ($$->text) {
+		    text_item *p;
+		    for (p = $$->text; p->next; p = p->next)
+		      ;
+		    p->adj.v = ABOVE_ADJUST;
+		  }
+		}
+	| object_spec BELOW
+		{
+		  $$ = $1;
+		  if ($$->text) {
+		    text_item *p;
+		    for (p = $$->text; p->next; p = p->next)
+		      ;
+		    p->adj.v = BELOW_ADJUST;
+		  }
+		}
+	| object_spec THICKNESS expr
+		{
+		  $$ = $1;
+		  $$->flags |= HAS_THICKNESS;
+		  $$->thickness = $3;
+		}
+	| object_spec ALIGNED
+		{
+		  $$ = $1;
+		  $$->flags |= IS_ALIGNED;
+		}
+	;
+
+text:
+	TEXT
+		{ $$ = $1; }
+	| SPRINTF '(' TEXT sprintf_args ')'
+		{
+		  $$.filename = $3.filename;
+		  $$.lineno = $3.lineno;
+		  $$.str = do_sprintf($3.str, $4.v, $4.nv);
+		  a_delete $4.v;
+		  a_delete $3.str;
+		}
+	;
+
+sprintf_args:
+	/* empty */
+		{
+		  $$.v = 0;
+		  $$.nv = 0;
+		  $$.maxv = 0;
+		}
+	| sprintf_args ',' expr
+		{
+		  $$ = $1;
+		  if ($$.nv >= $$.maxv) {
+		    if ($$.nv == 0) {
+		      $$.v = new double[4];
+		      $$.maxv = 4;
+		    }
+		    else {
+		      double *oldv = $$.v;
+		      $$.maxv *= 2;
+		      $$.v = new double[$$.maxv];
+		      memcpy($$.v, oldv, $$.nv*sizeof(double));
+		      a_delete oldv;
+		    }
+		  }
+		  $$.v[$$.nv] = $3;
+		  $$.nv += 1;
+		}
+	;
+
+position:
+  	position_not_place
+		{ $$ = $1; }
+	| place
+  		{
+		  position pos = $1;
+		  $$.x = pos.x;
+		  $$.y = pos.y;
+		}
+	;
+
+position_not_place:
+	expr_pair
+		{ $$ = $1; }
+	| position '+' expr_pair
+		{
+		  $$.x = $1.x + $3.x;
+		  $$.y = $1.y + $3.y;
+		}
+	| position '-' expr_pair
+		{
+		  $$.x = $1.x - $3.x;
+		  $$.y = $1.y - $3.y;
+		}
+	| '(' position ',' position ')'
+		{
+		  $$.x = $2.x;
+		  $$.y = $4.y;
+		}
+	| expr between position AND position
+		{
+		  $$.x = (1.0 - $1)*$3.x + $1*$5.x;
+		  $$.y = (1.0 - $1)*$3.y + $1*$5.y;
+		}
+	| expr '<' position ',' position '>'
+		{
+		  $$.x = (1.0 - $1)*$3.x + $1*$5.x;
+		  $$.y = (1.0 - $1)*$3.y + $1*$5.y;
+		}
+	;
+
+between:
+	BETWEEN
+	| OF THE WAY BETWEEN
+	;
+
+expr_pair:
+	expr ',' expr
+		{
+		  $$.x = $1;
+		  $$.y = $3;
+		}
+	| '(' expr_pair ')'
+		{ $$ = $2; }
+	;
+
+place:
+	/* line at A left == line (at A) left */
+	label							%prec CHOP
+		{ $$ = $1; }
+	| label corner
+		{
+		  path pth($2);
+		  if (!pth.follow($1, & $$))
+		    YYABORT;
+		}
+	| corner label
+		{
+		  path pth($1);
+		  if (!pth.follow($2, & $$))
+		    YYABORT;
+		}
+	| corner OF label
+		{
+		  path pth($1);
+		  if (!pth.follow($3, & $$))
+		    YYABORT;
+		}
+	| HERE
+		{
+		  $$.x = current_position.x;
+		  $$.y = current_position.y;
+		  $$.obj = 0;
+		}
+	;
+
+label:
+	LABEL
+		{
+		  place *p = lookup_label($1);
+		  if (!p) {
+		    lex_error("there is no place `%1'", $1);
+		    YYABORT;
+		  }
+		  $$ = *p;
+		  a_delete $1;
+		}
+	| nth_primitive
+		{ $$.obj = $1; }
+	| label '.' LABEL
+		{
+		  path pth($3);
+		  if (!pth.follow($1, & $$))
+		    YYABORT;
+		}
+	;
+
+ordinal:
+	ORDINAL
+		{ $$ = $1; }
+	| '`' any_expr TH
+		{
+		  // XXX Check for overflow (and non-integers?).
+		  $$ = (int)$2;
+		}
+	;
+
+optional_ordinal_last:
+	LAST
+		{ $$ = 1; }
+  	| ordinal LAST
+		{ $$ = $1; }
+	;
+
+nth_primitive:
+	ordinal object_type
+		{
+		  int count = 0;
+		  object *p;
+		  for (p = olist.head; p != 0; p = p->next)
+		    if (p->type() == $2 && ++count == $1) {
+		      $$ = p;
+		      break;
+		    }
+		  if (p == 0) {
+		    lex_error("there is no %1%2 %3", $1, ordinal_postfix($1),
+			      object_type_name($2));
+		    YYABORT;
+		  }
+		}
+	| optional_ordinal_last object_type
+		{
+		  int count = 0;
+		  object *p;
+		  for (p = olist.tail; p != 0; p = p->prev)
+		    if (p->type() == $2 && ++count == $1) {
+		      $$ = p;
+		      break;
+		    }
+		  if (p == 0) {
+		    lex_error("there is no %1%2 last %3", $1,
+			      ordinal_postfix($1), object_type_name($2));
+		    YYABORT;
+		  }
+		}
+	;
+
+object_type:
+	BOX
+  		{ $$ = BOX_OBJECT; }
+	| CIRCLE
+		{ $$ = CIRCLE_OBJECT; }
+	| ELLIPSE
+		{ $$ = ELLIPSE_OBJECT; }
+	| ARC
+		{ $$ = ARC_OBJECT; }
+	| LINE
+		{ $$ = LINE_OBJECT; }
+	| ARROW
+		{ $$ = ARROW_OBJECT; }
+	| SPLINE
+		{ $$ = SPLINE_OBJECT; }
+	| '[' ']'
+		{ $$ = BLOCK_OBJECT; }
+	| TEXT
+		{ $$ = TEXT_OBJECT; }
+	;
+
+label_path:
+ 	'.' LABEL
+		{ $$ = new path($2); }
+	| label_path '.' LABEL
+		{
+		  $$ = $1;
+		  $$->append($3);
+		}
+	;
+
+relative_path:
+	corner							%prec CHOP
+		{ $$ = new path($1); }
+	/* give this a lower precedence than LEFT and RIGHT so that
+	   [A: box] with .A left == [A: box] with (.A left) */
+  	| label_path						%prec TEXT
+		{ $$ = $1; }
+	| label_path corner
+		{
+		  $$ = $1;
+		  $$->append($2);
+		}
+	;
+
+path:
+	relative_path
+		{ $$ = $1; }
+	| '(' relative_path ',' relative_path ')'
+		{
+		  $$ = $2;
+		  $$->set_ypath($4);
+		}
+	/* The rest of these rules are a compatibility sop. */
+	| ORDINAL LAST object_type relative_path
+		{
+		  lex_warning("`%1%2 last %3' in `with' argument ignored",
+			      $1, ordinal_postfix($1), object_type_name($3));
+		  $$ = $4;
+		}
+	| LAST object_type relative_path
+		{
+		  lex_warning("`last %1' in `with' argument ignored",
+			      object_type_name($2));
+		  $$ = $3;
+		}
+	| ORDINAL object_type relative_path
+		{
+		  lex_warning("`%1%2 %3' in `with' argument ignored",
+			      $1, ordinal_postfix($1), object_type_name($2));
+		  $$ = $3;
+		}
+	| LABEL relative_path
+		{
+		  lex_warning("initial `%1' in `with' argument ignored", $1);
+		  a_delete $1;
+		  $$ = $2;
+		}
+	;
+
+corner:
+	DOT_N
+		{ $$ = &object::north; }
+	| DOT_E	
+		{ $$ = &object::east; }
+	| DOT_W
+		{ $$ = &object::west; }
+	| DOT_S
+		{ $$ = &object::south; }
+	| DOT_NE
+		{ $$ = &object::north_east; }
+	| DOT_SE
+		{ $$ = &object:: south_east; }
+	| DOT_NW
+		{ $$ = &object::north_west; }
+	| DOT_SW
+		{ $$ = &object::south_west; }
+	| DOT_C
+		{ $$ = &object::center; }
+	| DOT_START
+		{ $$ = &object::start; }
+	| DOT_END
+		{ $$ = &object::end; }
+  	| TOP
+		{ $$ = &object::north; }
+	| BOTTOM
+		{ $$ = &object::south; }
+	| LEFT
+		{ $$ = &object::west; }
+	| RIGHT
+		{ $$ = &object::east; }
+	| UPPER LEFT
+		{ $$ = &object::north_west; }
+	| LOWER LEFT
+		{ $$ = &object::south_west; }
+	| UPPER RIGHT
+		{ $$ = &object::north_east; }
+	| LOWER RIGHT
+		{ $$ = &object::south_east; }
+	| LEFT_CORNER
+		{ $$ = &object::west; }
+	| RIGHT_CORNER
+		{ $$ = &object::east; }
+	| UPPER LEFT_CORNER
+		{ $$ = &object::north_west; }
+	| LOWER LEFT_CORNER
+		{ $$ = &object::south_west; }
+	| UPPER RIGHT_CORNER
+		{ $$ = &object::north_east; }
+	| LOWER RIGHT_CORNER
+		{ $$ = &object::south_east; }
+	| NORTH
+		{ $$ = &object::north; }
+	| SOUTH
+		{ $$ = &object::south; }
+	| EAST
+		{ $$ = &object::east; }
+	| WEST
+		{ $$ = &object::west; }
+	| CENTER
+		{ $$ = &object::center; }
+	| START
+		{ $$ = &object::start; }
+	| END
+		{ $$ = &object::end; }
+	;
+
+expr:
+	VARIABLE
+		{
+		  if (!lookup_variable($1, & $$)) {
+		    lex_error("there is no variable `%1'", $1);
+		    YYABORT;
+		  }
+		  a_delete $1;
+		}
+	| NUMBER
+		{ $$ = $1; }
+	| place DOT_X
+  		{
+		  if ($1.obj != 0)
+		    $$ = $1.obj->origin().x;
+		  else
+		    $$ = $1.x;
+		}			
+	| place DOT_Y
+		{
+		  if ($1.obj != 0)
+		    $$ = $1.obj->origin().y;
+		  else
+		    $$ = $1.y;
+		}
+	| place DOT_HT
+		{
+		  if ($1.obj != 0)
+		    $$ = $1.obj->height();
+		  else
+		    $$ = 0.0;
+		}
+	| place DOT_WID
+		{
+		  if ($1.obj != 0)
+		    $$ = $1.obj->width();
+		  else
+		    $$ = 0.0;
+		}
+	| place DOT_RAD
+		{
+		  if ($1.obj != 0)
+		    $$ = $1.obj->radius();
+		  else
+		    $$ = 0.0;
+		}
+	| expr '+' expr
+		{ $$ = $1 + $3; }
+	| expr '-' expr
+		{ $$ = $1 - $3; }
+	| expr '*' expr
+		{ $$ = $1 * $3; }
+	| expr '/' expr
+		{
+		  if ($3 == 0.0) {
+		    lex_error("division by zero");
+		    YYABORT;
+		  }
+		  $$ = $1/$3;
+		}
+	| expr '%' expr
+		{
+		  if ($3 == 0.0) {
+		    lex_error("modulus by zero");
+		    YYABORT;
+		  }
+		  $$ = fmod($1, $3);
+		}
+	| expr '^' expr
+		{
+		  errno = 0;
+		  $$ = pow($1, $3);
+		  if (errno == EDOM) {
+		    lex_error("arguments to `^' operator out of domain");
+		    YYABORT;
+		  }
+		  if (errno == ERANGE) {
+		    lex_error("result of `^' operator out of range");
+		    YYABORT;
+		  }
+		}
+	| '-' expr						%prec '!'
+		{ $$ = -$2; }
+	| '(' any_expr ')'
+		{ $$ = $2; }
+	| SIN '(' any_expr ')'
+		{
+		  errno = 0;
+		  $$ = sin($3);
+		  if (errno == ERANGE) {
+		    lex_error("sin result out of range");
+		    YYABORT;
+		  }
+		}
+	| COS '(' any_expr ')'
+		{
+		  errno = 0;
+		  $$ = cos($3);
+		  if (errno == ERANGE) {
+		    lex_error("cos result out of range");
+		    YYABORT;
+		  }
+		}
+	| ATAN2 '(' any_expr ',' any_expr ')'
+		{
+		  errno = 0;
+		  $$ = atan2($3, $5);
+		  if (errno == EDOM) {
+		    lex_error("atan2 argument out of domain");
+		    YYABORT;
+		  }
+		  if (errno == ERANGE) {
+		    lex_error("atan2 result out of range");
+		    YYABORT;
+		  }
+		}
+	| LOG '(' any_expr ')'
+		{
+		  errno = 0;
+		  $$ = log10($3);
+		  if (errno == ERANGE) {
+		    lex_error("log result out of range");
+		    YYABORT;
+		  }
+		}
+	| EXP '(' any_expr ')'
+		{
+		  errno = 0;
+		  $$ = pow(10.0, $3);
+		  if (errno == ERANGE) {
+		    lex_error("exp result out of range");
+		    YYABORT;
+		  }
+		}
+	| SQRT '(' any_expr ')'
+		{
+		  errno = 0;
+		  $$ = sqrt($3);
+		  if (errno == EDOM) {
+		    lex_error("sqrt argument out of domain");
+		    YYABORT;
+		  }
+		}
+	| K_MAX '(' any_expr ',' any_expr ')'
+		{ $$ = $3 > $5 ? $3 : $5; }
+	| K_MIN '(' any_expr ',' any_expr ')'
+		{ $$ = $3 < $5 ? $3 : $5; }
+	| INT '(' any_expr ')'
+		{ $$ = floor($3); }
+	| RAND '(' any_expr ')'
+		{ $$ = 1.0 + floor(((rand()&0x7fff)/double(0x7fff))*$3); }
+	| RAND '(' ')'
+		{
+		  /* return a random number in the range >=0, <1 */
+		  /* portable, but not very random */
+		  $$ = (rand() & 0x7fff) / double(0x8000);
+		}
+	| SRAND '(' any_expr ')'
+		{
+		  $$ = 0;
+		  srand((unsigned int)$3);
+		}
+	| expr '<' expr
+		{ $$ = ($1 < $3); }
+	| expr LESSEQUAL expr
+		{ $$ = ($1 <= $3); }
+	| expr '>' expr
+		{ $$ = ($1 > $3); }
+	| expr GREATEREQUAL expr
+		{ $$ = ($1 >= $3); }
+	| expr EQUALEQUAL expr
+		{ $$ = ($1 == $3); }
+	| expr NOTEQUAL expr
+		{ $$ = ($1 != $3); }
+	| expr ANDAND expr
+		{ $$ = ($1 != 0.0 && $3 != 0.0); }
+	| expr OROR expr
+		{ $$ = ($1 != 0.0 || $3 != 0.0); }
+	| '!' expr
+		{ $$ = ($2 == 0.0); }
+
+	;
+]])
+
+# Pass plenty of options, to exercise plenty of code, even if we
+# don't actually check the output.  But SEGV is watching us, and
+# so might do dmalloc.
+AT_CHECK([[bison --verbose --defines input.y]], 0, [], [])
 
 AT_CLEANUP




From MAILER-DAEMON Fri Apr 18 03:57:29 2003
Received: from list by monty-python.gnu.org with archive (Exim 4.10.13)
	id 196QhO-0005dH-00
	for mharc-bug-bison@gnu.org; Fri, 18 Apr 2003 03:54:18 -0400
Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.10.13)
	id 196Qg1-0003jT-00
	for bug-bison@gnu.org; Fri, 18 Apr 2003 03:52:53 -0400
Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.10.13)
	id 196QeQ-0003LJ-00
	for bug-bison@gnu.org; Fri, 18 Apr 2003 03:51:15 -0400
Received: from kiwi.cs.ucla.edu ([131.179.128.19])
	by monty-python.gnu.org with esmtp (Exim 4.10.13)
	id 196Qe1-0003Gn-00
	for bug-bison@gnu.org; Fri, 18 Apr 2003 03:50:49 -0400
Received: (from eggert@localhost)
	by kiwi.cs.ucla.edu (8.11.7+Sun/8.11.6/UCLACS-5.2) id h3I7o8T07853;
	Fri, 18 Apr 2003 00:50:08 -0700 (PDT)
Date: Fri, 18 Apr 2003 00:50:08 -0700 (PDT)
From: Paul Eggert <eggert@CS.UCLA.EDU>
Message-Id: <200304180750.h3I7o8T07853@kiwi.cs.ucla.edu>
To: 189332@bugs.debian.org
cc: bug-bison@gnu.org
cc: lex-help@lists.sourceforge.net
cc: Peter Muir <iyhi@yahoo.com>
Subject: flex: unput(char) not valid outside body of grammar
X-BeenThere: bug-bison@gnu.org
X-Mailman-Version: 2.1b5
Precedence: list
List-Id: Bug reports for Bison, the GNU parser generator <bug-bison.gnu.org>
List-Help: <mailto:bug-bison-request@gnu.org?subject=help>
List-Post: <mailto:bug-bison@gnu.org>
List-Subscribe: <http://mail.gnu.org/mailman/listinfo/bug-bison>,
	<mailto:bug-bison-request@gnu.org?subject=subscribe>
List-Archive: <http://mail.gnu.org/pipermail/bug-bison>
List-Unsubscribe: <http://mail.gnu.org/mailman/listinfo/bug-bison>,
	<mailto:bug-bison-request@gnu.org?subject=unsubscribe>
X-List-Received-Date: Fri, 18 Apr 2003 07:54:16 -0000

This email is following up to a Debian bug report about flex
<http://bugs.debian.org/189332>, which reports that flex test version
2.5.31 breaks Bison 1.875.

> From: Manoj Srivastava <srivasta@debian.org>
> Date: Date: Wed, 16 Apr 2003 17:40:13 -0500

> This is a new feature of flex. It cleans up after it self; there are
> a number of assets present in the rules section that are not present
> outside it. This is helpful since flex nmow no longer pollutes the
> user namespace as much, and helps in allowing for multiple scanners,
> with potentialy different options, in the same program.

This change means that flex no longer conforms to POSIX 1003.1-2001.
The POSIX specification for lex
<http://www.opengroup.org/onlinepubs/007904975/utilities/lex.html>
says that the functions yylex, yymore, yyless, input, and unput are
all accessible to user code included in the lex input.  As far as I
can tell, POSIX imposes no restriction that the functions are
accessible only to user actions.

The change to flex may be necessary for reentrant scanners, but it
shouldn't be necessary for traditional scanners such as those
specified by POSIX.


> Please consider the following modification to the flex file
> you submitted in th patch

I tried doing something like that for Bison (along the lines suggested
by Peter Muir in
<http://mail.gnu.org/archive/html/bison-patches/2003-04/msg00002.html>),
but this had other problems: it called yyunput before it was declared,
and this violates C99.

I shall rework Bison so that it doesn't use unput at all.  This will
avoid the portability hassles, at the cost of making the Bison scanner
a bit less elegant.  However, I suggest that the flex maintainers fix
the incompatibility with POSIX, as people will be using flex to build
older versions of Bison for quite some time.  Also, people will be
using flex to build other scanners that may assume the POSIX-required
behavior.



From MAILER-DAEMON Fri Apr 18 05:13:59 2003
Received: from list by monty-python.gnu.org with archive (Exim 4.10.13)
	id 196RwV-0004xj-00
	for mharc-bug-bison@gnu.org; Fri, 18 Apr 2003 05:13:59 -0400
Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.10.13)
	id 196RwT-0004tU-00
	for bug-bison@gnu.org; Fri, 18 Apr 2003 05:13:57 -0400
Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.10.13)
	id 196RwR-0004ow-00
	for bug-bison@gnu.org; Fri, 18 Apr 2003 05:13:56 -0400
Received: from host-12-107-230-171.dtccom.net ([12.107.230.171]
	helo=glaurung.green-gryphon.com)
	by monty-python.gnu.org with esmtp (Exim 4.10.13)	id 196RwQ-0004kZ-00
	for bug-bison@gnu.org; Fri, 18 Apr 2003 05:13:54 -0400
Received: from glaurung.green-gryphon.com (srivasta@localhost [127.0.0.1])
	h3I9AuCO003398;	Fri, 18 Apr 2003 04:10:56 -0500
Received: (from srivasta@localhost)h3I9AtI4003394;
	Fri, 18 Apr 2003 04:10:55 -0500
X-Authentication-Warning: glaurung.green-gryphon.com: srivasta set sender to
	srivasta@debian.org using -f
X-Mailer: emacs 21.2.2 (via feedmail 8 I)
To: Paul Eggert <eggert@CS.UCLA.EDU>
From: Manoj Srivastava <srivasta@debian.org>
Organization: The Debian Project
X-URL: http://www.debian.org/%7Esrivasta/
User-Agent: Microsoft Gnus Express, Build 5.090019 (0.19)
Mail-Copies-To: nobody
X-Face: #q.#]5@vq!Jz+E0t_/;
	Y^gTjR\T^"B'fbeuVGiyKrvbfKJl!^e|e:iu(kJ6c|QYB57LP*|t
	&YlP~HF/=h:GA6o6W@I#deQL-%#.6]!z:6Cj0kd#4]>*D,|0djf'CVlXkI,>aV4\}?d_KEqsN{Nnt7
	78"OsbQ["56/!nisvyB/uA5Q.{)gm6?q.j71ww.>b9b]-sG8zNt%KkIa>xWg&1VcjZk[hBQ>]j~`Wq
	Xl,y1a!(>6`UM{~'X[Y_,Bv+}=L\SS*mA8=s;!=O`ja|@PEzb&i0}Qp,`Z\:6:OmRi*
Date: Fri, 18 Apr 2003 04:10:55 -0500
In-Reply-To: <200304180750.h3I7o8T07853@kiwi.cs.ucla.edu> (Paul Eggert's
 message of "Fri, 18 Apr 2003 00:50:08 -0700 (PDT)")
Message-ID: <871y0041cw.fsf@glaurung.green-gryphon.com>
References: <200304180750.h3I7o8T07853@kiwi.cs.ucla.edu>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
cc: bug-bison@gnu.org
cc: 189332@bugs.debian.org
cc: debian-devel@lists.debian.org
cc: lex-help@lists.sourceforge.net
cc: Peter Muir <iyhi@yahoo.com>
Subject: Re: Bug#189332: flex: unput(char) not valid outside body of grammar
X-BeenThere: bug-bison@gnu.org
X-Mailman-Version: 2.1b5
Precedence: list
List-Id: Bug reports for Bison, the GNU parser generator <bug-bison.gnu.org>
List-Help: <mailto:bug-bison-request@gnu.org?subject=help>
List-Post: <mailto:bug-bison@gnu.org>
List-Subscribe: <http://mail.gnu.org/mailman/listinfo/bug-bison>,
	<mailto:bug-bison-request@gnu.org?subject=subscribe>
List-Archive: <http://mail.gnu.org/pipermail/bug-bison>
List-Unsubscribe: <http://mail.gnu.org/mailman/listinfo/bug-bison>,
	<mailto:bug-bison-request@gnu.org?subject=unsubscribe>
X-List-Received-Date: Fri, 18 Apr 2003 09:13:58 -0000

>> On Fri, 18 Apr 2003 00:50:08 -0700 (PDT),
>> Paul Eggert <eggert@CS.UCLA.EDU> said: 

 > This email is following up to a Debian bug report about flex
 >> http://bugs.debian.org/189332>, which reports that flex test
 >> http://bugs.debian.org/189332>version
 > 2.5.31 breaks Bison 1.875.

 >> From: Manoj Srivastava <srivasta@debian.org> Date: Date: Wed, 16
 >> Apr 2003 17:40:13 -0500

 > This change means that flex no longer conforms to POSIX
 > 1003.1-2001.  The POSIX specification for lex
 >> http://www.opengroup.org/onlinepubs/007904975/utilities/lex.html>
 > says that the functions yylex, yymore, yyless, input, and unput are
 > all accessible to user code included in the lex input.  As far as I
 > can tell, POSIX imposes no restriction that the functions are
 > accessible only to user actions.

 > The change to flex may be necessary for reentrant scanners, but it
 > shouldn't be necessary for traditional scanners such as those
 > specified by POSIX.

	Indeed. The full POSIX references are:
 ISO/IEX 9945-2: 1993(3)   Information Technology -- POSIX
 IEEE Std 1003.2-1992      Part 2: Shell and Utilities
  A.2.7.5 lex Actions

	It also says that it is unspecified whether the functions or
 macros appear in the C code output of lex, or are accessible only
 through the -l l operand og the c compiler. 


	I have, however, noticed something bizarre: adding a %nounput
 options defines unput, but never undefines it, this seems like a bug
 somewhere. 
----------------------------------------------------------------------
%{
/* A template scanner file to build "scanner.c". */
#include <stdio.h>
#include <stdlib.h>
#include "config.h"
/*#include "parser.h" */

static void f(const char *x);

%}

%option 8bit outfile="scanner.c" prefix="test"
%option nomain noyywrap nounput
%option warn

%%
%{
 void f(const char *x) { unput(*x); }
%}

[0-9]              { unput('?'); }
[a-z]              { f("?"); }
.
%%

int main(void);

int
main ()
{
    yyin = stdin;
    yyout = stdout;
    yylex();
    printf("TEST RETURNING OK.\n");
    return 0;
}
----------------------------------------------------------------------
 

>> Please consider the following modification to the flex file
 >> you submitted in th patch

 > I tried doing something like that for Bison (along the lines suggested
 > by Peter Muir in
 > <http://mail.gnu.org/archive/html/bison-patches/2003-04/msg00002.html>),
 > but this had other problems: it called yyunput before it was declared,
 > and this violates C99.


	Umm, the modification I provided was tested, and it did not
 call yyunput before it was declared (the trick is to place the
 functions in the _rules_ section in %{ %} stanzas. 

	manoj
-- 
God gave you that gifted tongue of yours, and set it between your
teeth, to make known your true meaning to us, not be rattled like a
muffin man's bell. Carlyle

Manoj Srivastava   <srivasta@debian.org>  <http://www.debian.org/%7Esrivasta/>
1024R/C7261095 print CB D9 F4 12 68 07 E4 05  CC 2D 27 12 1D F5 E8 6E
1024D/BF24424C print 4966 F272 D093 B493 410B  924B 21BA DABB BF24 424C



From MAILER-DAEMON Fri Apr 18 06:25:27 2003
Received: from list by monty-python.gnu.org with archive (Exim 4.10.13)
	id 196T14-0002Uv-00
	for mharc-bug-bison@gnu.org; Fri, 18 Apr 2003 06:22:46 -0400
Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.10.13)
	id 196T0h-0001rp-00
	for bug-bison@gnu.org; Fri, 18 Apr 2003 06:22:23 -0400
Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.10.13)
	id 196T0M-0001VN-00
	for bug-bison@gnu.org; Fri, 18 Apr 2003 06:22:03 -0400
Received: from kiwi.cs.ucla.edu ([131.179.128.19])
	by monty-python.gnu.org with esmtp (Exim 4.10.13)
	id 196T0K-0001SP-00
	for bug-bison@gnu.org; Fri, 18 Apr 2003 06:22:01 -0400
Received: (from eggert@localhost)
	by kiwi.cs.ucla.edu (8.11.7+Sun/8.11.6/UCLACS-5.2) id h3IALPo11992;
	Fri, 18 Apr 2003 03:21:25 -0700 (PDT)
To: 189332@bugs.debian.org
References: <200304180750.h3I7o8T07853@kiwi.cs.ucla.edu>
	<871y0041cw.fsf@glaurung.green-gryphon.com>
From: Paul Eggert <eggert@CS.UCLA.EDU>
Date: 18 Apr 2003 03:21:25 -0700
In-Reply-To: <871y0041cw.fsf@glaurung.green-gryphon.com>
Message-ID: <vi88yu86r8a.fsf@cs.ucla.edu>
Lines: 23
User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.3
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
cc: bug-bison@gnu.org
cc: debian-devel@lists.debian.org
cc: lex-help@lists.sourceforge.net
cc: Peter Muir <iyhi@yahoo.com>
Subject: Re: Bug#189332: flex: unput(char) not valid outside body of grammar
X-BeenThere: bug-bison@gnu.org
X-Mailman-Version: 2.1b5
Precedence: list
List-Id: Bug reports for Bison, the GNU parser generator <bug-bison.gnu.org>
List-Help: <mailto:bug-bison-request@gnu.org?subject=help>
List-Post: <mailto:bug-bison@gnu.org>
List-Subscribe: <http://mail.gnu.org/mailman/listinfo/bug-bison>,
	<mailto:bug-bison-request@gnu.org?subject=subscribe>
List-Archive: <http://mail.gnu.org/pipermail/bug-bison>
List-Unsubscribe: <http://mail.gnu.org/mailman/listinfo/bug-bison>,
	<mailto:bug-bison-request@gnu.org?subject=unsubscribe>
X-List-Received-Date: Fri, 18 Apr 2003 10:22:37 -0000

Manoj Srivastava <srivasta@debian.org> writes:

>  [POSIX] also says that it is unspecified whether the functions or
>  macros appear in the C code output of lex, or are accessible only
>  through the -l l operand of the c compiler. 

Yes.  This means that if Bison were trying to be portable to all lex
variants, Bison would have to link itself with -ll for the lex
variants that define unput etc. in the lex library.  Bison assumes
flex, though, so it doesn't have to worry about that possibility.

One other problem I've observed is that flex 2.5.31 defines
yylex_destroy even if the application doesn't need yylex_destroy.
There is no %option noyylex_destroy.


>  the modification I provided was tested, and it did not
>  call yyunput before it was declared (the trick is to place the
>  functions in the _rules_ section in %{ %} stanzas. 

That modification relies on nested functions, which is not portable.
Bison is supposed to be portable to any ANSI C compiler, so it can't
use that technique.



From MAILER-DAEMON Sat Apr 19 01:37:38 2003
Received: from list by monty-python.gnu.org with archive (Exim 4.10.13)
	id 196l2f-0004LA-00
	for mharc-bug-bison@gnu.org; Sat, 19 Apr 2003 01:37:37 -0400
Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.10.13)
	id 196l2d-0004Gb-00
	for bug-bison@gnu.org; Sat, 19 Apr 2003 01:37:35 -0400
Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.10.13)
	id 196l2b-0004Cz-00
	for bug-bison@gnu.org; Sat, 19 Apr 2003 01:37:33 -0400
Received: from moutng.kundenserver.de ([212.227.126.189])
	by monty-python.gnu.org with esmtp (Exim 4.10.13)
	id 196l2b-000490-00
	for bug-bison@gnu.org; Sat, 19 Apr 2003 01:37:33 -0400
Received: from [212.227.126.205] (helo=mrelayng.kundenserver.de)
	by moutng.kundenserver.de with esmtp (Exim 3.35 #1)
	id 196l2Z-00072Y-00; Sat, 19 Apr 2003 07:37:31 +0200
Received: from [212.152.213.145] (helo=orion.local)
	(TLSv1:EDH-RSA-DES-CBC3-SHA:168)	(Exim 3.35 #1)
	id 196l2Y-0006xN-00; Sat, 19 Apr 2003 07:37:30 +0200
Received: from localhost (localhost [127.0.0.1])h3ICfKN32499;
	Fri, 18 Apr 2003 14:41:20 +0200
Date: Fri, 18 Apr 2003 14:41:20 +0200 (CEST)
Message-Id: <20030418.144120.25167682.wl@gnu.org>
To: eggert@CS.UCLA.EDU
From: Werner LEMBERG <wl@gnu.org>
In-Reply-To: <vi88yu8tmg9.fsf@cs.ucla.edu>
References: <200304172310.h3HNA2gg008549@tully.CS.Berkeley.EDU>
	<vi88yu8tmg9.fsf@cs.ucla.edu>
X-Mailer: Mew version 4.0.51 on Emacs 21.3.50.1 / Mule 5.0 (SAKAKI)
Mime-Version: 1.0
Content-Type: Text/Plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
cc: bug-bison@gnu.org
Subject: Re: problem with groff's pic.y grammar
X-BeenThere: bug-bison@gnu.org
X-Mailman-Version: 2.1b5
Precedence: list
List-Id: Bug reports for Bison, the GNU parser generator <bug-bison.gnu.org>
List-Help: <mailto:bug-bison-request@gnu.org?subject=help>
List-Post: <mailto:bug-bison@gnu.org>
List-Subscribe: <http://mail.gnu.org/mailman/listinfo/bug-bison>,
	<mailto:bug-bison-request@gnu.org?subject=subscribe>
List-Archive: <http://mail.gnu.org/pipermail/bug-bison>
List-Unsubscribe: <http://mail.gnu.org/mailman/listinfo/bug-bison>,
	<mailto:bug-bison-request@gnu.org?subject=unsubscribe>
X-List-Received-Date: Sat, 19 Apr 2003 05:37:35 -0000

> I installed this fix. [...]

Hmm, I took the sources of bison-1.875 and applied your patch, but now
I get the following compilation error:

  y.tab.c: In function `int yyparse()':
  y.tab.c:4156: parse error before `goto'

The relevant code snippet:


  /*----------------------------------------------------.
  | yyerrlab1 -- error raised explicitly by an action.  |
  `----------------------------------------------------*/
  yyerrlab1:

    /* Suppress GCC warning that yyerrlab1 is unused when no action
       invokes YYERROR.  */
  #if defined (__GNUC_MINOR__) && 2093 <= (__GNUC__ * 1000 + __GNUC_MINOR__)
    __attribute__ ((__unused__))
  #endif


    goto yyerrlab2;


I'm using g++ 2.95.3 -- gcc.info writes about the `unused' attribute:

  `unused'
    This attribute, attached to a function, means that the function is
    meant to be possibly unused.  GNU CC will not produce a warning
    for this function.  GNU C++ does not currently support this
    attribute as definitions without parameters are valid in C++.

It seems that you have to do this:

  #if defined (__GNUC_MINOR__) \
      && 2093 <= (__GNUC__ * 1000 + __GNUC_MINOR__) \
      && !defined (__cplusplus)
    __attribute__ ((__unused__))
  #endif


    Werner



From MAILER-DAEMON Sat Apr 19 12:44:29 2003
Received: from list by monty-python.gnu.org with archive (Exim 4.10.13)
	id 196vS1-0006JG-00
	for mharc-bug-bison@gnu.org; Sat, 19 Apr 2003 12:44:29 -0400
Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.10.13)
	id 196vRy-0006Fv-00
	for bug-bison@gnu.org; Sat, 19 Apr 2003 12:44:26 -0400
Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.10.13)
	id 196vRx-0006Fk-00
	for bug-bison@gnu.org; Sat, 19 Apr 2003 12:44:26 -0400
Received: from kiwi.cs.ucla.edu ([131.179.128.19])
	by monty-python.gnu.org with esmtp (Exim 4.10.13)
	id 196vR6-00014Q-00; Sat, 19 Apr 2003 12:43:33 -0400
Received: (from eggert@localhost)
	by kiwi.cs.ucla.edu (8.11.7+Sun/8.11.6/UCLACS-5.2) id h3JGg9909795;
	Sat, 19 Apr 2003 09:42:09 -0700 (PDT)
To: Werner LEMBERG <wl@gnu.org>
References: <200304172310.h3HNA2gg008549@tully.CS.Berkeley.EDU>
	<vi88yu8tmg9.fsf@cs.ucla.edu> <20030418.144120.25167682.wl@gnu.org>
From: Paul Eggert <eggert@CS.UCLA.EDU>
Date: 19 Apr 2003 09:42:09 -0700
In-Reply-To: <20030418.144120.25167682.wl@gnu.org>
Message-ID: <vi8k7dqjv6m.fsf@cs.ucla.edu>
Lines: 12
User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.3
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
cc: bug-bison@gnu.org
Subject: Re: problem with groff's pic.y grammar
X-BeenThere: bug-bison@gnu.org
X-Mailman-Version: 2.1b5
Precedence: list
List-Id: Bug reports for Bison, the GNU parser generator <bug-bison.gnu.org>
List-Help: <mailto:bug-bison-request@gnu.org?subject=help>
List-Post: <mailto:bug-bison@gnu.org>
List-Subscribe: <http://mail.gnu.org/mailman/listinfo/bug-bison>,
	<mailto:bug-bison-request@gnu.org?subject=subscribe>
List-Archive: <http://mail.gnu.org/pipermail/bug-bison>
List-Unsubscribe: <http://mail.gnu.org/mailman/listinfo/bug-bison>,
	<mailto:bug-bison-request@gnu.org?subject=unsubscribe>
X-List-Received-Date: Sat, 19 Apr 2003 16:44:27 -0000

Werner LEMBERG <wl@gnu.org> writes:

> Hmm, I took the sources of bison-1.875 and applied your patch, but now
> I get the following compilation error:
> 
>   y.tab.c: In function `int yyparse()':
>   y.tab.c:4156: parse error before `goto'

That bug was fixed a while ago -- I think the fix is in Bison 1.875a.
You might try starting with that rather than with 1.875.

ftp://alpha.gnu.org/gnu/bison/bison-1.875a.tar.gz



From MAILER-DAEMON Sat Apr 19 12:49:59 2003
Received: from list by monty-python.gnu.org with archive (Exim 4.10.13)
	id 196vXJ-0008Kg-00
	for mharc-bug-bison@gnu.org; Sat, 19 Apr 2003 12:49:57 -0400
Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.10.13)
	id 196vXE-0008B0-00
	for bug-bison@gnu.org; Sat, 19 Apr 2003 12:49:52 -0400
Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.10.13)
	id 196vWw-0007bc-00
	for bug-bison@gnu.org; Sat, 19 Apr 2003 12:49:34 -0400
Received: from kiwi.cs.ucla.edu ([131.179.128.19])
	by monty-python.gnu.org with esmtp (Exim 4.10.13)
	id 196vWt-0007UZ-00; Sat, 19 Apr 2003 12:49:31 -0400
Received: (from eggert@localhost)
	by kiwi.cs.ucla.edu (8.11.7+Sun/8.11.6/UCLACS-5.2) id h3JGnSZ09986;
	Sat, 19 Apr 2003 09:49:28 -0700 (PDT)
To: Werner LEMBERG <wl@gnu.org>
References: <200304172310.h3HNA2gg008549@tully.CS.Berkeley.EDU>
	<vi88yu8tmg9.fsf@cs.ucla.edu> <20030418.085029.91214170.wl@gnu.org>
From: Paul Eggert <eggert@CS.UCLA.EDU>
Date: 19 Apr 2003 09:49:28 -0700
In-Reply-To: <20030418.085029.91214170.wl@gnu.org>
Message-ID: <vi8fzoejuuf.fsf@cs.ucla.edu>
Lines: 8
User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.3
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
cc: groff@ffii.org
cc: bug-bison@gnu.org
cc: bug-groff@gnu.org
Subject: Re: problem with groff's pic.y grammar
X-BeenThere: bug-bison@gnu.org
X-Mailman-Version: 2.1b5
Precedence: list
List-Id: Bug reports for Bison, the GNU parser generator <bug-bison.gnu.org>
List-Help: <mailto:bug-bison-request@gnu.org?subject=help>
List-Post: <mailto:bug-bison@gnu.org>
List-Subscribe: <http://mail.gnu.org/mailman/listinfo/bug-bison>,
	<mailto:bug-bison-request@gnu.org?subject=subscribe>
List-Archive: <http://mail.gnu.org/pipermail/bug-bison>
List-Unsubscribe: <http://mail.gnu.org/mailman/listinfo/bug-bison>,
	<mailto:bug-bison-request@gnu.org?subject=unsubscribe>
X-List-Received-Date: Sat, 19 Apr 2003 16:49:55 -0000

Werner LEMBERG <wl@gnu.org> writes:

> Thanks for the quick fix!  Which version of bison will contain this
> patch?  I have to add something to groff's `PROBLEMS' file.

It will be in the next version after 1.875a.  Most likely this will be
test version 1.875b, as the current CVS Bison is not particularly
stable (it fails several tests on my host).



From MAILER-DAEMON Sun Apr 20 23:33:09 2003
Received: from list by monty-python.gnu.org with archive (Exim 4.10.13)
	id 197S31-0004wI-00
	for mharc-bug-bison@gnu.org; Sun, 20 Apr 2003 23:32:51 -0400
Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.10.13)
	id 197S2h-0004pa-00
	for bug-bison@gnu.org; Sun, 20 Apr 2003 23:32:31 -0400
Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.10.13)
	id 197S10-0003m6-00
	for bug-bison@gnu.org; Sun, 20 Apr 2003 23:30:47 -0400
Received: from gnuftp.gnu.org ([199.232.41.6])
	by monty-python.gnu.org with esmtp (Exim 4.10.13)
	id 197S0y-0003iE-00
	for bug-bison@gnu.org; Sun, 20 Apr 2003 23:30:44 -0400
Received: from adsl-211-211-237.mia.bellsouth.net ([68.211.211.237]
	helo=lifestyleUdeserve.com)
	by gnuftp.gnu.org with smtp (Exim 4.10.13)	id 197S0q-0007So-00
	for bug-bison@gnu.org; Sun, 20 Apr 2003 23:30:38 -0400
Content-Type: text/html; charset="US-ASCII"
Date: Sun, 20 Apr 2003 23:30:18 -0400
To: bug-bison@gnu.org
From: "Success Connection" <eugene@lifestyleUdeserve.com>
X-Mailer: Version 5.0
Organization: 
Message-Id: <E197S0q-0007So-00@gnuftp.gnu.org>
Subject: 5-Year Anniversary Invitation - RSVP!!!
X-BeenThere: bug-bison@gnu.org
X-Mailman-Version: 2.1b5
Precedence: list
List-Id: Bug reports for Bison, the GNU parser generator <bug-bison.gnu.org>
List-Help: <mailto:bug-bison-request@gnu.org?subject=help>
List-Post: <mailto:bug-bison@gnu.org>
List-Subscribe: <http://mail.gnu.org/mailman/listinfo/bug-bison>,
	<mailto:bug-bison-request@gnu.org?subject=subscribe>
List-Archive: <http://mail.gnu.org/pipermail/bug-bison>
List-Unsubscribe: <http://mail.gnu.org/mailman/listinfo/bug-bison>,
	<mailto:bug-bison-request@gnu.org?subject=unsubscribe>
X-List-Received-Date: Mon, 21 Apr 2003 03:32:50 -0000

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD><TITLE>Message</TITLE>
<META http-equiv=Content-Type content="text/html; charset=iso-8859-2">
<META content="MSHTML 6.00.2800.1141" name=GENERATOR></HEAD>
<BODY>
<DIV><FONT face=Arial><SPAN class=932331421-16042003><STRONG>You are cordially 
invited</STRONG> to&nbsp;attend the spectacular celebration of our 
</SPAN></FONT></DIV>
<DIV><SPAN class=932331421-16042003><FONT face=Arial><FONT 
color=#ff0000><STRONG>5-Year Anniversary!</STRONG></FONT></FONT></SPAN></DIV>
<DIV><FONT face=Arial><SPAN class=932331421-16042003></SPAN></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial><SPAN class=932331421-16042003>Five years ago when my wife 
and I came to live and work in&nbsp; Ankara we were </SPAN></FONT></DIV>
<DIV><FONT face=Arial><SPAN class=932331421-16042003>asked this question a lot: 
"Why did you decide to come to our country to build </SPAN></FONT></DIV>
<DIV><FONT face=Arial><SPAN class=932331421-16042003>your 
business?"</SPAN></FONT></DIV>
<DIV><FONT face=Arial><FONT face=Arial><SPAN 
class=932331421-16042003></SPAN></FONT></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial><SPAN class=932331421-16042003>Our answer was: <EM>because 
Turkish market is the best kept secret in Europe</EM>! </SPAN></FONT></DIV>
<DIV><FONT face=Arial><SPAN class=932331421-16042003></SPAN></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial><SPAN class=932331421-16042003>Many people did not believe 
us. </SPAN><SPAN class=932331421-16042003>A few believed and&nbsp;<SPAN 
class=746541320-17042003>went to work with 
us</SPAN>.&nbsp;Today</SPAN></FONT></DIV>
<DIV><FONT face=Arial><FONT size=+0><SPAN class=932331421-16042003>many 
</SPAN></FONT><SPAN class=932331421-16042003>of them earn more in a month 
</SPAN><SPAN class=932331421-16042003>than they used to earn in a year<SPAN 
class=746541320-17042003>.</SPAN><SPAN class=746541320-17042003> T</SPAN>ogether 
</SPAN></FONT></DIV>
<DIV><FONT face=Arial><SPAN class=932331421-16042003>we built what proves to be 
the most exciting and profitable business opportunity </SPAN></FONT></DIV>
<DIV><SPAN class=932331421-16042003><FONT face=Arial>in Turkey today<SPAN 
class=746541320-17042003> - and <EM>we are still just getting 
started</EM>!</SPAN></FONT></SPAN></DIV>
<DIV><FONT face=Arial><SPAN class=932331421-16042003></SPAN></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial><SPAN class=932331421-16042003>Consider just a few 
examples of what we helped our team members to accomplish:</SPAN></FONT></DIV>
<DIV><FONT size=+0><SPAN class=932331421-16042003><FONT size=2></FONT><BR><FONT 
face=Arial><EM>Gamze K. Emekli yüksek hemsire. Nisan 1999'da bu isle tanisti. 
<BR>Gamze Kiliç bu ise basladiginda yeni emekli olmustu. Gamze Kiliç emekli 
<BR>olduktan sonra, kendisini kanitlayabilecegi ve iyi bir gelir elde 
<BR>edebilecegi bir is ariyordu. Bu iº tam isteklerine göre bir isti.. 
<BR>Sirket Gamze Kiliç'i 8-10 kez yurt disi egitimine gönderdi. <BR>Geçen 
ay&nbsp;8+ milyar TL gelir elde etti.</EM></FONT></DIV>
<DIV><FONT face=Arial><EM></EM></FONT>&nbsp;</DIV>
<DIV><EM><FONT face=Arial>Aºkin Ç. OTDÜ mezunu metalurji mühendisi. Eylül 1998 
bu i<SPAN class=932331421-16042003>º</SPAN>le <BR>tanisti. Askin Cakir Ankara'da 
i<SPAN class=932331421-16042003>º</SPAN> makinalari mümessili olan bir firmada 
<BR>çalisirken, patronsuz, milyarlarca yatirim yapmaksizin kendi isini kurma 
<BR>firsatini ariyordu. Sirket Askin Çakir'i da bir çok kez yurt disi 
<BR>egitimine davet etti. Aylik ortalama geliri&nbsp;<SPAN 
class=932331421-16042003>5+</SPAN> milyar TL.</FONT></EM></DIV>
<DIV><FONT face=Arial><EM></EM></FONT>&nbsp;</DIV>
<DIV><EM><FONT face=Arial>Fatih S. Iº Adami. Ocak 1999'da bu isle tanisti. 
5&nbsp;<SPAN class=932331421-16042003>º</SPAN>irket sahibi <BR>olan Fatih Süalp, 
arkada<SPAN class=932331421-16042003>º</SPAN>i Hafize Sentürk araciligiyla bu 
isle tanisti. <BR>Maddi problemi olmayan bu kisi eglence ve seyahat amaçli bu 
i<SPAN class=932331421-16042003>º</SPAN>i part-time <BR>yapmaya basladi. Daha 
sonra isin maddi boyutunu görünce de yakla<SPAN 
class=932331421-16042003>º</SPAN>ik 3 aydir <BR>full-time yapmaya baslamis 
durumda. Su anda henüz küçük bir gruptan olusan <BR>liderler arasinda yer 
aliyor.&nbsp;Geçen ay ki geliri&nbsp;<SPAN class=932331421-16042003>10+</SPAN> 
milyar TL üzerinde.</FONT></EM></SPAN></FONT></DIV>
<DIV><SPAN class=932331421-16042003><FONT face=Arial></FONT>&nbsp;</DIV>
<DIV><SPAN class=932331421-16042003><FONT face=Arial><SPAN 
class=932331421-16042003>We are expanding in key areas and will be interviewing 
candidates during our</SPAN>&nbsp;<BR><SPAN 
class=932331421-16042003>&nbsp;<STRONG><FONT color=#ff0000>5-Year Anniversary 
Celebration<SPAN class=894060600-21042003>s</SPAN><SPAN 
class=894060600-21042003> </SPAN></FONT></STRONG><SPAN 
class=894060600-21042003>this week. </SPAN>Don't miss this opportunity 
to</SPAN></FONT>
<DIV>
<DIV><SPAN class=932331421-16042003><FONT face=Arial>become a part of the 
<STRONG>most succesful business team in 
Turkey</STRONG>!</FONT></SPAN></DIV></DIV></SPAN></DIV>
<DIV><FONT face=Arial><SPAN class=932331421-16042003></SPAN></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial><SPAN class=932331421-16042003>Whether you are 
looking&nbsp;to work</SPAN>&nbsp;part time, or to build a new and excitin<SPAN 
class=932331421-16042003>g</SPAN></FONT></DIV>
<DIV><SPAN class=932331421-16042003></SPAN><FONT face=Arial>career 
that&nbsp;<SPAN class=746541320-17042003>may </SPAN>provide you&nbsp;<SPAN 
class=932331421-16042003>with </SPAN>unlimited income, financial independence 
<BR><SPAN class=932331421-16042003>a</SPAN>nd freedom<SPAN 
class=932331421-16042003>&nbsp; - we can teach you and show you how. F</SPAN>ill 
out the&nbsp; following form</FONT></DIV>
<DIV><SPAN class=746541320-17042003></SPAN><FONT face=Arial>a<SPAN 
class=746541320-17042003>nd we will contact you with the details of the 
event::</SPAN></FONT></DIV>
<DIV><FONT face=Arial><SPAN class=746541320-17042003></SPAN></FONT><BR><A 
href="http://www.lifestyleUdeserve.com/hakettiginikazan.html"><FONT 
face=Arial>http://www<SPAN 
class=746541320-17042003>.lifestyleUdeserve.com</SPAN>/hakettiginikazan.html</FONT></A></DIV>
<DIV><FONT face=Arial size=2></FONT><A 
href="http://www.galaxymall.com/business/international/Profile.html"><FONT 
face=Arial></FONT></A><FONT face=Arial size=2></FONT><FONT face=Arial 
size=2></FONT><FONT face=Arial size=2></FONT><BR><FONT face=Arial><SPAN 
class=932331421-16042003>With Warm Regards,</SPAN></FONT></DIV>
<DIV>
<DIV><FONT face=Arial><SPAN class=932331421-16042003>
<DIV><SPAN class=932331421-16042003><FONT face=Arial>Eugene 
Bylinin</FONT></SPAN></DIV>
<DIV><SPAN class=932331421-16042003><FONT face=Arial>HBL Millionaire 
Team</FONT></SPAN></DIV></SPAN></FONT></DIV>
<DIV><FONT face=Arial><SPAN class=932331421-16042003></SPAN></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial><SPAN class=932331421-16042003><EM>En iyi tarafi, su anki 
isinizi tehlikeye atmadan isinizi part-time insa <BR>edebilirsiniz. Bugünkü 
hedefiniz ne i<SPAN class=932331421-16042003>&nbsp;</SPAN>e ($200 veya $500 veya 
daha azi/çogu), <BR>bu hedefe ulasmaniz için size kanitlanmis plani 
gösterecegim.</EM> 
<DIV><BR><EM>Size böyle bir firsatin daha önce sunulmadigindan eminim. Harekete 
<BR>geçmek isteyen ve gerçekten zengin olmak isteyen kisiyseniz, simdi 
<BR>yapmaniz gereken sey, asagidaki web sitemize girip buradaki 
<BR>yönlendirmeleri takip etmek olacaktir.</EM></DIV></SPAN></FONT></DIV></DIV>
<DIV><FONT face=Arial></FONT>&nbsp;</DIV>
<DIV><A href="http://www.lifestyleUdeserve.com/hakettiginikazan.html"><FONT 
face=Arial>http://www.<SPAN 
class=746541320-17042003>lifestyleUdeserve</SPAN>.com/hakettiginikazan.html</FONT></A></DIV>
<DIV><FONT face=Arial color=#0000ff size=2></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial color=#0000ff size=2></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial color=#0000ff size=2></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial color=#0000ff size=2></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial color=#0000ff size=2></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial color=#0000ff size=2></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial color=#0000ff size=2></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial color=#0000ff size=2></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial color=#0000ff size=2></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial color=#0000ff size=2></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial color=#0000ff size=2></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial color=#0000ff size=2></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial color=#0000ff size=2></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial color=#0000ff size=2></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial color=#0000ff size=2></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial color=#0000ff size=2></FONT>&nbsp;</DIV>
<DIV><FONT size=2><SPAN class=894060600-21042003>I am sending t</SPAN>his 
message to&nbsp;<SPAN class=894060600-21042003>you at </SPAN>bug-bison@gnu.org<SPAN 
class=894060600-21042003> while&nbsp;visiting on </SPAN></FONT></DIV>
<DIV><SPAN class=894060600-21042003><FONT size=2>http://gnu.bilkent.edu.tr/prep/mailinglists.html. If you received this 
message in error <BR>please&nbsp;accept my apologies.&nbsp;If you wish to remove 
yourself<BR>please click here:&nbsp;</FONT></SPAN><A 
href="mailto:remove@lifestyleudeserve.com?subject=bug-bison@gnu.org"><FONT 
size=2>mailto:remove@<SPAN 
class=894060600-21042003>lifestyleudeserve.com</SPAN>?subject=bug-bison@gnu.org</FONT></A><SPAN 
class=894060600-21042003><FONT size=2> </FONT></SPAN></DIV>
<DIV><FONT size=2><SPAN 
class=894060600-21042003></SPAN></FONT>&nbsp;</DIV></SPAN></BODY></HTML>




From MAILER-DAEMON Wed Apr 23 16:48:47 2003
Received: from list by monty-python.gnu.org with archive (Exim 4.10.13)
	id 198QrU-0008LN-00
	for mharc-bug-bison@gnu.org; Wed, 23 Apr 2003 16:29:00 -0400
Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.10.13)
	id 198Ql5-0006Vl-00
	for bug-bison@gnu.org; Wed, 23 Apr 2003 16:22:23 -0400
Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.10.13)
	id 198QhM-0005El-00
	for bug-bison@gnu.org; Wed, 23 Apr 2003 16:18:33 -0400
Received: from kiwi.cs.ucla.edu ([131.179.128.19])
	by monty-python.gnu.org with esmtp (Exim 4.10.13)
	id 198Qgo-0004kL-00
	for bug-bison@gnu.org; Wed, 23 Apr 2003 16:17:58 -0400
Received: (from eggert@localhost)
	by kiwi.cs.ucla.edu (8.11.7+Sun/8.11.6/UCLACS-5.2) id h3NKHi405086;
	Wed, 23 Apr 2003 13:17:44 -0700 (PDT)
To: =?iso-8859-15?q?Martin_MOKREJ=A6?= <mmokrejs@natur.cuni.cz>
References: <Pine.OSF.4.51.0304141631120.370497@tao.natur.cuni.cz>
	<Pine.OSF.4.51.0304141903090.162938@tao.natur.cuni.cz>
From: Paul Eggert <eggert@CS.UCLA.EDU>
Date: 23 Apr 2003 13:17:44 -0700
In-Reply-To: <Pine.OSF.4.51.0304141903090.162938@tao.natur.cuni.cz>
Message-ID: <vi8vfx57ytz.fsf@cs.ucla.edu>
Lines: 44
User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.3
MIME-Version: 1.0
Content-Type: text/plain; charset=iso-8859-15
Content-Transfer-Encoding: quoted-printable
cc: bug-bison@gnu.org
Subject: Re: bug in bison-1.875
X-BeenThere: bug-bison@gnu.org
X-Mailman-Version: 2.1b5
Precedence: list
List-Id: Bug reports for Bison, the GNU parser generator <bug-bison.gnu.org>
List-Help: <mailto:bug-bison-request@gnu.org?subject=help>
List-Post: <mailto:bug-bison@gnu.org>
List-Subscribe: <http://mail.gnu.org/mailman/listinfo/bug-bison>,
	<mailto:bug-bison-request@gnu.org?subject=subscribe>
List-Archive: <http://mail.gnu.org/pipermail/bug-bison>
List-Unsubscribe: <http://mail.gnu.org/mailman/listinfo/bug-bison>,
	<mailto:bug-bison-request@gnu.org?subject=unsubscribe>
X-List-Received-Date: Wed, 23 Apr 2003 20:28:59 -0000

Martin MOKREJ=A6 <mmokrejs@natur.cuni.cz> writes:

>  I checked current cvs version on Tru65Unix 5.1A and now all tests succee=
d or
> get skipped. Is there any explanation what happened to the code that now =
I do
> not observer failures when bison get's compiled with -O2 CFLAG?

Sorry, I don't know.

>  However, although cc crashes on the _Bool testcase run by configure, con=
figure
> writes to stdout that _Bool is available. Shouldn' it say no?

Yes, it should say "no".

> checking for stdbool.h that conforms to C99... no
> checking for _Bool... yes

What is the corresponding log output?  I am looking for the output of
the following fragment in configure.  If the compiler crashed, then
the first "ac_status=3D$?" quoted below should set ac_status to a
nonzero value.  The next "echo" statement logs that value, so I'd
like to see what it is.


echo "$as_me:$LINENO: checking for stdbool.h that conforms to C99" >&5
echo $ECHO_N "checking for stdbool.h that conforms to C99... $ECHO_C" >&6
...
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
  (eval $ac_compile) 2>&5
  ac_status=3D$?
  echo "$as_me:$LINENO: \$? =3D $ac_status" >&5
  (exit $ac_status); } &&
         { ac_try=3D'test -s conftest.$ac_objext'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=3D$?
  echo "$as_me:$LINENO: \$? =3D $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_cv_header_stdbool_h=3Dyes
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

ac_cv_header_stdbool_h=3Dno
fi



From MAILER-DAEMON Wed Apr 23 17:02:03 2003
Received: from list by monty-python.gnu.org with archive (Exim 4.10.13)
	id 198RM7-0008WC-00
	for mharc-bug-bison@gnu.org; Wed, 23 Apr 2003 17:00:39 -0400
Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.10.13)
	id 198RCV-0005Sn-00
	for bug-bison@gnu.org; Wed, 23 Apr 2003 16:50:43 -0400
Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.10.13)
	id 198QqD-0007pr-00
	for bug-bison@gnu.org; Wed, 23 Apr 2003 16:27:41 -0400
Received: from kiwi.cs.ucla.edu ([131.179.128.19])
	by monty-python.gnu.org with esmtp (Exim 4.10.13)
	id 198QpX-0007gH-00
	for bug-bison@gnu.org; Wed, 23 Apr 2003 16:26:59 -0400
Received: (from eggert@localhost)
	by kiwi.cs.ucla.edu (8.11.7+Sun/8.11.6/UCLACS-5.2) id h3NKQqM05495;
	Wed, 23 Apr 2003 13:26:52 -0700 (PDT)
To: =?iso-8859-15?q?Martin_MOKREJ=A6?= <mmokrejs@natur.cuni.cz>
References: <Pine.OSF.4.51.0304141631120.370497@tao.natur.cuni.cz>
From: Paul Eggert <eggert@CS.UCLA.EDU>
Date: 23 Apr 2003 13:26:52 -0700
In-Reply-To: <Pine.OSF.4.51.0304141631120.370497@tao.natur.cuni.cz>
Message-ID: <vi8r87t7yer.fsf@cs.ucla.edu>
Lines: 26
User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.3
MIME-Version: 1.0
Content-Type: text/plain; charset=iso-8859-15
Content-Transfer-Encoding: quoted-printable
cc: bug-bison@gnu.org
Subject: Re: bug in bison-1.875
X-BeenThere: bug-bison@gnu.org
X-Mailman-Version: 2.1b5
Precedence: list
List-Id: Bug reports for Bison, the GNU parser generator <bug-bison.gnu.org>
List-Help: <mailto:bug-bison-request@gnu.org?subject=help>
List-Post: <mailto:bug-bison@gnu.org>
List-Subscribe: <http://mail.gnu.org/mailman/listinfo/bug-bison>,
	<mailto:bug-bison-request@gnu.org?subject=subscribe>
List-Archive: <http://mail.gnu.org/pipermail/bug-bison>
List-Unsubscribe: <http://mail.gnu.org/mailman/listinfo/bug-bison>,
	<mailto:bug-bison-request@gnu.org?subject=unsubscribe>
X-List-Received-Date: Wed, 23 Apr 2003 21:00:37 -0000

Martin MOKREJ=A6 <mmokrejs@natur.cuni.cz> writes:

>   here're some answers from DEC/COMPAQ/HP engineers.

> From: "Belgardt, Wolfgang" <Wolfgang.Belgardt@hp.com>
> Date: Mon, 14 Apr 2003 16:26:40 +0200
>=20
> Dear Mr Mokreis,
>=20
> I have send your compiler log file to c++ engineering.
> Here is the answer.
>=20
>       Support for a conversion of an address to a bool is "undefined
>	behavior" according to the C99 standard.  So, it's valid for our
>	compiler to generate an error for this case.

This isn't correct for C99.  In C99, when you convert a null pointer
to _Bool, you get false; when you convert a non-null pointer to _Bool,
you get true.  C99 does not have a special case for pointers computed
via the address-of (&) operator; they are valid pointers, and can be
converted to _Bool just like any other pointers.

Perhaps the rules are different for C++; I don't know C++ that well.

Can you please forward this information to the developers via HP customer
support?  Thanks.



From MAILER-DAEMON Wed Apr 23 18:28:33 2003
Received: from list by monty-python.gnu.org with archive (Exim 4.10.13)
	id 198SiS-0007Mg-00
	for mharc-bug-bison@gnu.org; Wed, 23 Apr 2003 18:27:48 -0400
Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.10.13)
	id 198SiF-00071F-00
	for bug-bison@gnu.org; Wed, 23 Apr 2003 18:27:35 -0400
Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.10.13)
	id 198Shb-0005Wy-00
	for bug-bison@gnu.org; Wed, 23 Apr 2003 18:26:59 -0400
Received: from tao.natur.cuni.cz ([195.113.56.1])
	by monty-python.gnu.org with esmtp (Exim 4.10.13)
	id 198ShS-0004rL-00
	for bug-bison@gnu.org; Wed, 23 Apr 2003 18:26:46 -0400
Received: from tao.natur.cuni.cz (tao.natur.cuni.cz [195.113.56.1])
	by tao.natur.cuni.cz (8.12.9/8.12.8) with ESMTP id h3NMQWDT199340;
	Thu, 24 Apr 2003 00:26:32 +0200 (MDT)
X-Obalka-From: mmokrejs@natur.cuni.cz
Date: Thu, 24 Apr 2003 00:26:32 +0200 (CEST)
From: =?iso-8859-2?Q?Martin_MOKREJ=A9?= <mmokrejs@natur.cuni.cz>
To: Paul Eggert <eggert@CS.UCLA.EDU>
In-Reply-To: <vi8vfx57ytz.fsf@cs.ucla.edu>
Message-ID: <Pine.OSF.4.51.0304240020490.173135@tao.natur.cuni.cz>
References: <Pine.OSF.4.51.0304141631120.370497@tao.natur.cuni.cz>
	<vi8vfx57ytz.fsf@cs.ucla.edu>
MIME-Version: 1.0
Content-Type: TEXT/PLAIN; charset=iso-8859-2
Content-Transfer-Encoding: quoted-printable
X-MIME-Autoconverted: from 8bit to quoted-printable by tao.natur.cuni.cz id
	h3NMQWDT199340
cc: bug-bison@gnu.org
Subject: Re: bug in bison-1.875
X-BeenThere: bug-bison@gnu.org
X-Mailman-Version: 2.1b5
Precedence: list
List-Id: Bug reports for Bison, the GNU parser generator <bug-bison.gnu.org>
List-Help: <mailto:bug-bison-request@gnu.org?subject=help>
List-Post: <mailto:bug-bison@gnu.org>
List-Subscribe: <http://mail.gnu.org/mailman/listinfo/bug-bison>,
	<mailto:bug-bison-request@gnu.org?subject=subscribe>
List-Archive: <http://mail.gnu.org/pipermail/bug-bison>
List-Unsubscribe: <http://mail.gnu.org/mailman/listinfo/bug-bison>,
	<mailto:bug-bison-request@gnu.org?subject=unsubscribe>
X-List-Received-Date: Wed, 23 Apr 2003 22:27:46 -0000

On Wed, 23 Apr 2003, Paul Eggert wrote:

> Martin MOKREJ? <mmokrejs@natur.cuni.cz> writes:
>
> >  However, although cc crashes on the _Bool testcase run by configure,=
 configure
> > writes to stdout that _Bool is available. Shouldn' it say no?
>
> Yes, it should say "no".
>
> > checking for stdbool.h that conforms to C99... no
> > checking for _Bool... yes
>
> What is the corresponding log output?  I am looking for the output of
> the following fragment in configure.  If the compiler crashed, then
> the first "ac_status=3D$?" quoted below should set ac_status to a
> nonzero value.  The next "echo" statement logs that value, so I'd
> like to see what it is.
>


I've right now handy the old bugreport. As far as I can see, it used to s=
ay
"no". I'll double check current cvs tommorow. But $?=3D1 should be the
answer, right?


configure:4876: checking for stdbool.h that conforms to C99
configure:4930: cc -c -O2 -arch ev56 -I/software/@sys/usr/include -I/usr/=
local/include -I/usr/local/openssl/include conftest.
c >&5
cc: Error: configure, line 4938: Bug found in compiler: generate_address_=
constant : Unexpected opcode. (compilerbug)
          bool e =3D &s;
-------------------^
Internal compiler error detected at line 1512 in file /usr/proj/decc2/ccd=
tk-v4-2/src/me_gemc/initgen.c.
cc: Fatal: A memory access violation (bus error or segmentation fault)
has occurred.  Please submit a problem report.
configure:4933: $? =3D 1
configure: failed program was:
| #line 4881 "configure"
| /* confdefs.h.  */
|
| #define PACKAGE_NAME "GNU Bison"
| #define PACKAGE_TARNAME "bison"
| #define PACKAGE_VERSION "1.875a"
| #define PACKAGE_STRING "GNU Bison 1.875a"
| #define PACKAGE_BUGREPORT "bug-bison@gnu.org"
| #define PACKAGE "bison"
| #define VERSION "1.875a"
| #define _GNU_SOURCE 1
| #define STDC_HEADERS 1
| #define HAVE_SYS_TYPES_H 1
| #define HAVE_SYS_STAT_H 1
| #define HAVE_STDLIB_H 1
| #define HAVE_STRING_H 1
| #define HAVE_MEMORY_H 1
| #define HAVE_STRINGS_H 1
| #define HAVE_INTTYPES_H 1
| #define HAVE_STDINT_H 1
| #define HAVE_UNISTD_H 1
| #define YYTEXT_POINTER 1
| #define M4 "/software/@sys/usr/bin/m4"
| #define STDC_HEADERS 1
| #define HAVE_CTYPE_H 1
| #define HAVE_LOCALE_H 1
| #define HAVE_MEMORY_H 1
| #define HAVE_STDLIB_H 1
| #define HAVE_STRING_H 1
| #define HAVE_UNISTD_H 1
| /* end confdefs.h.  */
|
|         #include <stdbool.h>
|         #ifndef bool
|          "error: bool is not defined"
|         #endif
|         #ifndef false
|          "error: false is not defined"
|         #endif
|         #if false
|          "error: false is not 0"
|         #endif
|         #ifndef true
|          "error: false is not defined"
|         #endif
|         #if true !=3D 1
|          "error: true is not 1"
|         #endif
|         #ifndef __bool_true_false_are_defined
|          "error: __bool_true_false_are_defined is not defined"
|         #endif
|
|         struct s { _Bool s: 1; _Bool t; } s;
|
|         char a[true =3D=3D 1 ? 1 : -1];
|         char b[false =3D=3D 0 ? 1 : -1];
|         char c[__bool_true_false_are_defined =3D=3D 1 ? 1 : -1];
|         char d[(bool) -0.5 =3D=3D true ? 1 : -1];
|         bool e =3D &s;
|         char f[(_Bool) -0.0 =3D=3D false ? 1 : -1];
|         char g[true];
|         char h[sizeof (_Bool)];
|         char i[sizeof s.t];
|
| int
| main ()
| {
|  return !a + !b + !c + !d + !e + !f + !g + !h + !i;
|   ;
|   return 0;
| }
configure:4950: result: no


--=20
Martin Mokrejs <mmokrejs@natur.cuni.cz>, <m.mokrejs@gsf.de>
PGP5.0i key is at http://www.natur.cuni.cz/~mmokrejs
MIPS / Institute for Bioinformatics <http://mips.gsf.de>
GSF - National Research Center for Environment and Health
Ingolstaedter Landstrasse 1, D-85764 Neuherberg, Germany
tel.: +49-89-3187 3683 , fax:=A0+49-89-3187 3585



From MAILER-DAEMON Wed Apr 23 19:42:02 2003
Received: from list by monty-python.gnu.org with archive (Exim 4.10.13)
	id 198TrO-0005Oo-00
	for mharc-bug-bison@gnu.org; Wed, 23 Apr 2003 19:41:06 -0400
Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.10.13)
	id 198Tqc-0004e8-00
	for bug-bison@gnu.org; Wed, 23 Apr 2003 19:40:18 -0400
Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.10.13)
	id 198Tq7-0003sc-00
	for bug-bison@gnu.org; Wed, 23 Apr 2003 19:39:48 -0400
Received: from kiwi.cs.ucla.edu ([131.179.128.19])
	by monty-python.gnu.org with esmtp (Exim 4.10.13)
	id 198Tpg-0003fg-00
	for bug-bison@gnu.org; Wed, 23 Apr 2003 19:39:20 -0400
Received: (from eggert@localhost)
	by kiwi.cs.ucla.edu (8.11.7+Sun/8.11.6/UCLACS-5.2) id h3NNdCE18515;
	Wed, 23 Apr 2003 16:39:12 -0700 (PDT)
To: =?iso-8859-15?q?Martin_MOKREJ=A6?= <mmokrejs@natur.cuni.cz>
References: <Pine.OSF.4.51.0304141631120.370497@tao.natur.cuni.cz>
	<Pine.OSF.4.51.0304141903090.162938@tao.natur.cuni.cz>
	<vi8vfx57ytz.fsf@cs.ucla.edu>
	<Pine.OSF.4.51.0304240020490.173135@tao.natur.cuni.cz>
From: Paul Eggert <eggert@CS.UCLA.EDU>
Date: 23 Apr 2003 16:39:12 -0700
In-Reply-To: <Pine.OSF.4.51.0304240020490.173135@tao.natur.cuni.cz>
Message-ID: <vi88yu0942n.fsf@cs.ucla.edu>
Lines: 8
User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.3
MIME-Version: 1.0
Content-Type: text/plain; charset=iso-8859-15
Content-Transfer-Encoding: quoted-printable
cc: bug-bison@gnu.org
Subject: Re: bug in bison-1.875
X-BeenThere: bug-bison@gnu.org
X-Mailman-Version: 2.1b5
Precedence: list
List-Id: Bug reports for Bison, the GNU parser generator <bug-bison.gnu.org>
List-Help: <mailto:bug-bison-request@gnu.org?subject=help>
List-Post: <mailto:bug-bison@gnu.org>
List-Subscribe: <http://mail.gnu.org/mailman/listinfo/bug-bison>,
	<mailto:bug-bison-request@gnu.org?subject=subscribe>
List-Archive: <http://mail.gnu.org/pipermail/bug-bison>
List-Unsubscribe: <http://mail.gnu.org/mailman/listinfo/bug-bison>,
	<mailto:bug-bison-request@gnu.org?subject=unsubscribe>
X-List-Received-Date: Wed, 23 Apr 2003 23:41:04 -0000

Martin MOKREJ=A6 <mmokrejs@natur.cuni.cz> writes:

> I've right now handy the old bugreport. As far as I can see, it used to s=
ay
> "no". I'll double check current cvs tommorow. But $?=3D1 should be the
> answer, right?

It should be some nonzero value, yes.  Depending on whether it's zero,
we can focus on which part of the "configure" shell script is at fault.



From MAILER-DAEMON Thu Apr 24 05:38:00 2003
Received: from list by monty-python.gnu.org with archive (Exim 4.10.13)
	id 198dAy-0000bI-00
	for mharc-bug-bison@gnu.org; Thu, 24 Apr 2003 05:37:56 -0400
Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.10.13)
	id 198dAi-0008FQ-00
	for bug-bison@gnu.org; Thu, 24 Apr 2003 05:37:40 -0400
Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.10.13)
	id 198dAe-000838-00
	for bug-bison@gnu.org; Thu, 24 Apr 2003 05:37:37 -0400
Received: from tao.natur.cuni.cz ([195.113.56.1])
	by monty-python.gnu.org with esmtp (Exim 4.10.13)
	id 198dAb-0007qY-00
	for bug-bison@gnu.org; Thu, 24 Apr 2003 05:37:34 -0400
Received: from tao.natur.cuni.cz (tao.natur.cuni.cz [195.113.56.1])
	by tao.natur.cuni.cz (8.12.9/8.12.8) with ESMTP id h3O9bTDT258615;
	Thu, 24 Apr 2003 11:37:30 +0200 (MDT)
X-Obalka-From: mmokrejs@natur.cuni.cz
Date: Thu, 24 Apr 2003 11:37:29 +0200 (CEST)
From: =?iso-8859-2?Q?Martin_MOKREJ=A9?= <mmokrejs@natur.cuni.cz>
To: Paul Eggert <eggert@CS.UCLA.EDU>
In-Reply-To: <vi88yu0942n.fsf@cs.ucla.edu>
Message-ID: <Pine.OSF.4.51.0304241021410.236492@tao.natur.cuni.cz>
References: <Pine.OSF.4.51.0304141631120.370497@tao.natur.cuni.cz>
	<vi8vfx57ytz.fsf@cs.ucla.edu><vi88yu0942n.fsf@cs.ucla.edu>
MIME-Version: 1.0
Content-Type: TEXT/PLAIN; charset=iso-8859-2
Content-Transfer-Encoding: quoted-printable
X-MIME-Autoconverted: from 8bit to quoted-printable by tao.natur.cuni.cz id
	h3O9bTDT258615
cc: bug-bison@gnu.org
Subject: Re: bug in bison-1.875
X-BeenThere: bug-bison@gnu.org
X-Mailman-Version: 2.1b5
Precedence: list
List-Id: Bug reports for Bison, the GNU parser generator <bug-bison.gnu.org>
List-Help: <mailto:bug-bison-request@gnu.org?subject=help>
List-Post: <mailto:bug-bison@gnu.org>
List-Subscribe: <http://mail.gnu.org/mailman/listinfo/bug-bison>,
	<mailto:bug-bison-request@gnu.org?subject=subscribe>
List-Archive: <http://mail.gnu.org/pipermail/bug-bison>
List-Unsubscribe: <http://mail.gnu.org/mailman/listinfo/bug-bison>,
	<mailto:bug-bison-request@gnu.org?subject=unsubscribe>
X-List-Received-Date: Thu, 24 Apr 2003 09:37:55 -0000

On Thu, 23 Apr 2003, Paul Eggert wrote:

> Martin MOKREJ? <mmokrejs@natur.cuni.cz> writes:
>
> > I've right now handy the old bugreport. As far as I can see, it used =
to say
> > "no". I'll double check current cvs tommorow. But $?=3D1 should be th=
e
> > answer, right?
>
> It should be some nonzero value, yes.  Depending on whether it's zero,
> we can focus on which part of the "configure" shell script is at fault.

configure:4876: checking for stdbool.h that conforms to C99
configure:4930: cc -c -O2 -arch ev56 -I/software/@sys/usr/include -I/usr/=
local/include -I/usr/local/openssl/include conftest.c >&5
cc: Error: configure, line 4938: Bug found in compiler: generate_address_=
constant : Unexpected opcode. (compilerbug)
          bool e =3D &s;
-------------------^
Internal compiler error detected at line 1512 in file /usr/proj/decc2/ccd=
tk-v4-2/src/me_gemc/initgen.c.
cc: Fatal: A memory access violation (bus error or segmentation fault)
has occurred.  Please submit a problem report.
configure:4933: $? =3D 1
configure: failed program was:
| #line 4881 "configure"
| /* confdefs.h.  */
|
| #define PACKAGE_NAME "GNU Bison"
| #define PACKAGE_TARNAME "bison"
| #define PACKAGE_VERSION "1.875a"
[....]
|         char a[true =3D=3D 1 ? 1 : -1];
|         char b[false =3D=3D 0 ? 1 : -1];
|         char c[__bool_true_false_are_defined =3D=3D 1 ? 1 : -1];
|         char d[(bool) -0.5 =3D=3D true ? 1 : -1];
|         bool e =3D &s;
|         char f[(_Bool) -0.0 =3D=3D false ? 1 : -1];
|         char g[true];
|         char h[sizeof (_Bool)];
|         char i[sizeof s.t];
|
| int
| main ()
| {
|  return !a + !b + !c + !d + !e + !f + !g + !h + !i;
|   ;
|   return 0;
| }
configure:4950: result: no

Strange. So it look for 1.875a it works properly, i.e. detects that
compiler failed, right?

--=20
Martin Mokrejs <mmokrejs@natur.cuni.cz>, <m.mokrejs@gsf.de>
PGP5.0i key is at http://www.natur.cuni.cz/~mmokrejs
MIPS / Institute for Bioinformatics <http://mips.gsf.de>
GSF - National Research Center for Environment and Health
Ingolstaedter Landstrasse 1, D-85764 Neuherberg, Germany
tel.: +49-89-3187 3683 , fax:=A0+49-89-3187 3585



From MAILER-DAEMON Fri Apr 25 04:26:46 2003
Received: from list by monty-python.gnu.org with archive (Exim 4.10.13)
	id 198yXJ-0000Z5-00
	for mharc-bug-bison@gnu.org; Fri, 25 Apr 2003 04:26:25 -0400
Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.10.13)
	id 198yXD-0000Td-00
	for bug-bison@gnu.org; Fri, 25 Apr 2003 04:26:19 -0400
Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.10.13)
	id 198yX5-0000JG-00
	for bug-bison@gnu.org; Fri, 25 Apr 2003 04:26:12 -0400
Received: from tao.natur.cuni.cz ([195.113.56.1])
	by monty-python.gnu.org with esmtp (Exim 4.10.13)
	id 198yX0-00008x-00
	for bug-bison@gnu.org; Fri, 25 Apr 2003 04:26:06 -0400
Received: from tao.natur.cuni.cz (tao.natur.cuni.cz [195.113.56.1])
	by tao.natur.cuni.cz (8.12.9/8.12.8) with ESMTP id h3P8PtDT343481;
	Fri, 25 Apr 2003 10:25:56 +0200 (MDT)
X-Obalka-From: mmokrejs@natur.cuni.cz
Date: Fri, 25 Apr 2003 10:25:55 +0200 (CEST)
From: =?iso-8859-2?Q?Martin_MOKREJ=A9?= <mmokrejs@natur.cuni.cz>
To: Paul Eggert <eggert@cs.ucla.edu>
In-Reply-To: <87d6jbzq98.fsf@penguin.cs.ucla.edu>
Message-ID: <Pine.OSF.4.51.0304251014350.370732@tao.natur.cuni.cz>
References: <Pine.OSF.4.51.0304141631120.370497@tao.natur.cuni.cz>
	<vi8vfx57ytz.fsf@cs.ucla.edu><vi88yu0942n.fsf@cs.ucla.edu>
	<87d6jbzq98.fsf@penguin.cs.ucla.edu>
MIME-Version: 1.0
Content-Type: TEXT/PLAIN; charset=iso-8859-15
Content-Transfer-Encoding: quoted-printable
X-MIME-Autoconverted: from 8bit to quoted-printable by tao.natur.cuni.cz id
	h3P8PtDT343481
cc: bug-bison@gnu.org
Subject: Re: bug in bison-1.875
X-BeenThere: bug-bison@gnu.org
X-Mailman-Version: 2.1b5
Precedence: list
List-Id: Bug reports for Bison, the GNU parser generator <bug-bison.gnu.org>
List-Help: <mailto:bug-bison-request@gnu.org?subject=help>
List-Post: <mailto:bug-bison@gnu.org>
List-Subscribe: <http://mail.gnu.org/mailman/listinfo/bug-bison>,
	<mailto:bug-bison-request@gnu.org?subject=subscribe>
List-Archive: <http://mail.gnu.org/pipermail/bug-bison>
List-Unsubscribe: <http://mail.gnu.org/mailman/listinfo/bug-bison>,
	<mailto:bug-bison-request@gnu.org?subject=unsubscribe>
X-List-Received-Date: Fri, 25 Apr 2003 08:26:22 -0000

On Thu, 24 Apr 2003, Paul Eggert wrote:

> Martin MOKREJ=A9 <mmokrejs@natur.cuni.cz> writes:
>
> > cc -DHAVE_CONFIG_H -I. -I. -I.. -I.. -I../src -I../lib  -I/software/@=
sys/usr/include -I/usr/local/include -I/usr/local/openssl/include  -O2 -a=
rch ev56 -c `test -f 'bitset.c' || echo './'`bitset.c
> > cc: Warning: bitset.c, line 149: In this statement, the referenced ty=
pe of the pointer value "((((bobstack))->temp=3D((bytes)),((((bobstack))-=
>chunk_limit-((bobstack))->next_free<((bobstack))->temp)?(_obstack_newchu=
nk(...),0):0),(((bobstack))->next_free+=3D((bobstack))->temp)),((((bobsta=
ck))->next_free=3D=3D((bobstack))->object_base?((((bobstack))->maybe_empt=
y_object=3D1),0):0),((bobstack))->temp=3D((((bobstack))->object_base)-(ch=
ar ...)0),((bobstack))->next_free=3D(((((((bobstack))->next_free)-(char .=
..)0)+((bobstack))->alignment_mask)&~(((bobstack))->alignment_mask))+(cha=
r ...)0),((((bobstack))->next_free-(char ...)((bobstack))->chunk>((bobsta=
ck))->chunk_limit-(char ...)((bobstack))->chunk)?(((bobstack))->next_free=
=3D((bobstack))->chunk_limit):0),((bobstack))->object_base=3D((bobstack))=
->next_free,((((bobstack))->temp)+(char ...)0)))" is "char", which is not=
 compatible with "union bitset_union". (ptrmismatch)
> >   bset =3D obstack_alloc (bobstack, bytes);
> > --^
>
> This message comes because obstack.h contains this code:
>
> #ifndef __INT_TO_PTR
> #if defined __STDC__ && __STDC__
> # define __INT_TO_PTR(P) ((void *) ((P) + (char *) 0))
> #else
> # define __INT_TO_PTR(P) ((P) + (char *) 0)
> #endif
> #endif
>
> and I suspect that your compiler does not define __STDC__, or defines
> it to 0.  Is my suspicion correct?  If so, perhaps we should change
> that '#if'.

manpage for cc says:

  The default is -std.

  -std
      Selects the relaxed ANSI language mode. This is the default. Enforc=
es
      the ANSI C standard, but allows some common programming practices d=
is-
      allowed by the standard.

      This option does not restrict the Tru64 UNIX name space (for exampl=
e,
      the names defined in system header files). To restrict that name sp=
ace
      so that only ANSI C reserved names are visible from the ANSI C head=
er
      files, use the _ANSI_C_SOURCE macro. See standards(5) for more deta=
ils.

      This option sets the macro __STDC__ to 0.

  -std0
      Selects the K & R language mode. Enforces the K & R programming sty=
le,
      with certain ANSI extensions in areas where the K & R behavior is u=
nde-
      fined or ambiguous. In general, -std0 compiles most pre-ANSI C prog=
rams
      and produces expected results.  The -std0 option leaves the __STDC_=
_
      macro undefined.

  -std1
      Selects the strict ANSI language mode. Strictly enforces the ANSI C
      standard and all its prohibitions (such as those that apply to the =
han-
      dling of void types, the definition of lvalues in expressions, the =
mix-
      ing of integrals and pointers, and the modification of rvalues).

      This option does not restrict the Tru64 UNIX name space (for exampl=
e,
      the names defined in system header files). To restrict that name sp=
ace
      so that only ANSI C reserved names are visible from the ANSI C head=
er
      files, use the _ANSI_C_SOURCE macro. See standards(5) for more deta=
ils.

      This option sets the macro __STDC__ to 1. Note that this option als=
o
      affects linker-defined symbols. See ld(1) for more information.


  -c99
      Selects the strict ANSI C99 language mode. Strictly enforces the AN=
SI
      C99 standard and all its prohibitions.

      This option does not restrict the Tru64 UNIX name space (for exampl=
e,
      the names defined in system header files). To restrict that name sp=
ace
      so that only ANSI reserved names are visible from the ANSI header
      files, use the _ANSI_C_SOURCE macro. See standards(5) for
      more details.

      This option sets the macro __STDC_VERSION__ to 199901L, and the mac=
ro
      _STDC__ to 1.

  -isoc94
      Enables additional features from Amendment 1 to the ANSI C89 standa=
rd.

      This option sets the macro __STDC_VERSION__ to 199409L in
      all language
      modes except for the following:

       -c99  (__STDC_VERSION__ is set to 199901L)
       -vaxc (__STDC_VERSION__ is not set)

      This option has no effect on the macro __STDC__.


Anyway, here we are with latest compiler version available:

source=3D'bitset.c' object=3D'bitset.o' libtool=3Dno \
depfile=3D'.deps/bitset.Po' tmpdepfile=3D'.deps/bitset.TPo' \
depmode=3Dtru64 /bin/bash ../config/depcomp \
cc -v -DHAVE_CONFIG_H -I. -I. -I.. -I.. -I../src -I../lib  -I/software/@s=
ys/usr/include -I/usr/local/include -I/usr/local/openssl/include  -O2 -ar=
ch ev56 -c `test -f 'bitset.c' || echo './'`bitset.c

/usr/lib/cmplrs/cc.dtk/gemc_cc -D__LANGUAGE_C__ -D__unix__ -D__alpha -D_S=
YSTYPE_BSD -D_LONGLONG -D__arch64__ -D__digital__ -D__osf__ -g0 -O4 -pree=
mpt_symbol -std -intrinsics -noansi_alias -v -DHAVE_CONFIG_H -I. -I. -I..=
 -I.. -I../src -I../lib -I/software/@sys/usr/include -I/usr/local/include=
 -I/usr/local/openssl/include -I/usr/include.dtk -arch ev56 -MD -o bitset=
.o bitset.c

These macros are in effect at the start of the compilation.
----- ------ --- -- ------ -- --- ----- -- --- ------------

 -D__DECC -D__osf__ -D__arch64__ -D__PRAGMA_ENVIRONMENT -D_LONGLONG -D__d=
igital__ -D__X_FLOAT -D__DATE__=3D"Apr 25 2003"  -D__STDC_VERSION__=3D199=
901L  -D__DECC_MODE_RELAXED -D__DECC_VER=3D60590207  -D_SYSTYPE_BSD -D__A=
LPHA -DHAVE_CONFIG_H -D__IEEE_FLOAT -D__unix__ -D__STDC_HOSTED__ -D__TIME=
__=3D"10:18:16"  -D__Alpha_AXP -D__INITIAL_POINTER_SIZE=3D0  -D__STDC__=3D=
0  -D__LANGUAGE_C__ -D__alpha
cc: Warning: bitset.c, line 149: In this statement, the referenced type o=
f the pointer value "((((bobstack))->temp=3D((bytes)),((((bobstack))->chu=
nk_limit-((bobstack))->next_free<((bobstack))->temp)?(_obstack_newchunk(.=
..),0):0),(((bobstack))->next_free+=3D((bobstack))->temp)),((((bobstack))=
->next_free=3D=3D((bobstack))->object_base?((((bobstack))->maybe_empty_ob=
ject=3D1),0):0),((bobstack))->temp=3D((((bobstack))->object_base)-(char .=
..)0),((bobstack))->next_free=3D(((((((bobstack))->next_free)-(char ...)0=
)+((bobstack))->alignment_mask)&~(((bobstack))->alignment_mask))+(char ..=
.)0),((((bobstack))->next_free-(char ...)((bobstack))->chunk>((bobstack))=
->chunk_limit-(char ...)((bobstack))->chunk)?(((bobstack))->next_free=3D(=
(bobstack))->chunk_limit):0),((bobstack))->object_base=3D((bobstack))->ne=
xt_free,((((bobstack))->temp)+(char ...)0)))" is "char", which is not com=
patible with "union bitset_union". (ptrmismatch)
  bset =3D obstack_alloc (bobstack, bytes);
--^
/usr/lib/cmplrs/cc.dtk/gemc_cc:
0.37u 0.04s 0:00 95% 0+27k 0+5io 0pf+0w 27stk+3200mem
rm -f libbison.a
ar cru libbison.a argmatch.o basename.o dirname.o get-errno.o getopt.o ge=
topt1.o hash.o mbswidth.o quote.o quotearg.o subpipe.o xmalloc.o xstrdup.=
o xstrndup.o abitset.o bitset.o ebitset.o bitsetv.o bitset_stats.o lbitse=
t.o bitsetv-print.o timevar.o error.o error.o memrchr.o stpcpy.o strnlen.=
o obstack.o malloc.o realloc.o
ar: Warning: ignoring second definition of error defined in archive
ar: Warning: ignoring second definition of error_at_line defined in archi=
ve
ranlib libbison.a
ar: Warning: ignoring second definition of error defined in archive
ar: Warning: ignoring second definition of error_at_line defined in archi=
ve



--=20
Martin Mokrejs <mmokrejs@natur.cuni.cz>, <m.mokrejs@gsf.de>
PGP5.0i key is at http://www.natur.cuni.cz/~mmokrejs
MIPS / Institute for Bioinformatics <http://mips.gsf.de>
GSF - National Research Center for Environment and Health
Ingolstaedter Landstrasse 1, D-85764 Neuherberg, Germany
tel.: +49-89-3187 3683 , fax:=A0+49-89-3187 3585



From MAILER-DAEMON Sun Apr 27 01:07:46 2003
Received: from list by monty-python.gnu.org with archive (Exim 4.10.13)
	id 199eO9-0006No-00
	for mharc-bug-bison@gnu.org; Sun, 27 Apr 2003 01:07:45 -0400
Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.10.13)
	id 199eO5-00069j-00
	for bug-bison@gnu.org; Sun, 27 Apr 2003 01:07:41 -0400
Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.10.13)
	id 199eO3-00064Z-00
	for bug-bison@gnu.org; Sun, 27 Apr 2003 01:07:40 -0400
Received: from kiwi.cs.ucla.edu ([131.179.128.19])
	by monty-python.gnu.org with esmtp (Exim 4.10.13)
	id 199eO2-0005xp-00
	for bug-bison@gnu.org; Sun, 27 Apr 2003 01:07:38 -0400
Received: (from eggert@localhost)
	by kiwi.cs.ucla.edu (8.11.7+Sun/8.11.6/UCLACS-5.2) id h3R57Sr20797;
	Sat, 26 Apr 2003 22:07:28 -0700 (PDT)
To: =?iso-8859-15?q?Martin_MOKREJ=A6?= <mmokrejs@natur.cuni.cz>
References: <Pine.OSF.4.51.0304111108550.492032@tao.natur.cuni.cz>
From: Paul Eggert <eggert@CS.UCLA.EDU>
Date: 26 Apr 2003 22:07:28 -0700
In-Reply-To: <Pine.OSF.4.51.0304111108550.492032@tao.natur.cuni.cz>
Message-ID: <vi8sms4ttnz.fsf@cs.ucla.edu>
Lines: 7
User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.3
MIME-Version: 1.0
Content-Type: text/plain; charset=iso-8859-15
Content-Transfer-Encoding: quoted-printable
cc: bug-bison@gnu.org
Subject: Re: ./conftest$ac_exeext from bison-1.875a dumps core
X-BeenThere: bug-bison@gnu.org
X-Mailman-Version: 2.1b5
Precedence: list
List-Id: Bug reports for Bison, the GNU parser generator <bug-bison.gnu.org>
List-Help: <mailto:bug-bison-request@gnu.org?subject=help>
List-Post: <mailto:bug-bison@gnu.org>
List-Subscribe: <http://mail.gnu.org/mailman/listinfo/bug-bison>,
	<mailto:bug-bison-request@gnu.org?subject=subscribe>
List-Archive: <http://mail.gnu.org/pipermail/bug-bison>
List-Unsubscribe: <http://mail.gnu.org/mailman/listinfo/bug-bison>,
	<mailto:bug-bison-request@gnu.org?subject=unsubscribe>
X-List-Received-Date: Sun, 27 Apr 2003 05:07:43 -0000

Martin MOKREJ=A6 <mmokrejs@natur.cuni.cz> writes:

>   I think have missed this in config.log output. Could someone tell me wh=
at
> really dumps core so I could investigate further?

Presumably it's the test program that invokes strerror_r assuming that
it returns char *.



From MAILER-DAEMON Sun Apr 27 01:16:20 2003
Received: from list by monty-python.gnu.org with archive (Exim 4.10.13)
	id 199eWE-0001Ev-00
	for mharc-bug-bison@gnu.org; Sun, 27 Apr 2003 01:16:06 -0400
Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.10.13)
	id 199eW6-0000o7-00
	for bug-bison@gnu.org; Sun, 27 Apr 2003 01:15:58 -0400
Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.10.13)
	id 199eVv-0000P8-00
	for bug-bison@gnu.org; Sun, 27 Apr 2003 01:15:48 -0400
Received: from kiwi.cs.ucla.edu ([131.179.128.19])
	by monty-python.gnu.org with esmtp (Exim 4.10.13)
	id 199eVa-0008Bn-00
	for bug-bison@gnu.org; Sun, 27 Apr 2003 01:15:26 -0400
Received: (from eggert@localhost)
	by kiwi.cs.ucla.edu (8.11.7+Sun/8.11.6/UCLACS-5.2) id h3R5FIG20963;
	Sat, 26 Apr 2003 22:15:18 -0700 (PDT)
To: =?iso-8859-15?q?Martin_MOKREJ=A6?= <mmokrejs@natur.cuni.cz>
References: <Pine.OSF.4.51.0304111108550.492032@tao.natur.cuni.cz>
	<Pine.OSF.4.51.0304111131001.495743@tao.natur.cuni.cz>
	<Pine.OSF.4.51.0304111206010.503970@tao.natur.cuni.cz>
	<Pine.OSF.4.51.0304111232540.512136@tao.natur.cuni.cz>
From: Paul Eggert <eggert@CS.UCLA.EDU>
Date: 26 Apr 2003 22:15:18 -0700
In-Reply-To: <Pine.OSF.4.51.0304111232540.512136@tao.natur.cuni.cz>
Message-ID: <vi8of2sttax.fsf@cs.ucla.edu>
Lines: 38
User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.3
MIME-Version: 1.0
Content-Type: text/plain; charset=iso-8859-15
Content-Transfer-Encoding: quoted-printable
cc: bug-bison@gnu.org
Subject: Re: Cannot configure current cvs checkout
X-BeenThere: bug-bison@gnu.org
X-Mailman-Version: 2.1b5
Precedence: list
List-Id: Bug reports for Bison, the GNU parser generator <bug-bison.gnu.org>
List-Help: <mailto:bug-bison-request@gnu.org?subject=help>
List-Post: <mailto:bug-bison@gnu.org>
List-Subscribe: <http://mail.gnu.org/mailman/listinfo/bug-bison>,
	<mailto:bug-bison-request@gnu.org?subject=subscribe>
List-Archive: <http://mail.gnu.org/pipermail/bug-bison>
List-Unsubscribe: <http://mail.gnu.org/mailman/listinfo/bug-bison>,
	<mailto:bug-bison-request@gnu.org?subject=unsubscribe>
X-List-Received-Date: Sun, 27 Apr 2003 05:16:04 -0000

Martin MOKREJ=A6 <mmokrejs@natur.cuni.cz> writes:

> cc -DHAVE_CONFIG_H -I. -I. -I.. -I.. -I../src -I../lib  -I/software/@sys/=
usr/include -I/usr/local/include -I/usr/local/openssl/include  -O2 -arch ev=
56 -c `test -f 'bitset.c' || echo './'`bitset.c
> cc: Warning: bitset.c, line 149: In this statement, the referenced type o=
f the pointer value "[...]" is "char", which is not compatible with "union =
bitset_union". (ptrmismatch)
>   bset =3D obstack_alloc (bobstack, bytes);
> --^


Thanks for the bug report.  Please try this patch.  If it avoids that
glitch I'd like to install it into Bison.

2003-04-26  Paul Eggert  <eggert@twinsun.com>

	* lib/bitset.h (__INT_TO_PTR): Define to a value that presumes
        C89.  This avoids a diagnostic on compilers that define __STDC__
        to 0, fixing a problem with Tru64 cc reported by Martin Mokrejs in
        <http://mail.gnu.org/archive/html/bug-bison/2003-04/msg00041.html>.

--- lib/bitset.h.~1.11.~	Tue Nov 12 23:02:51 2002
+++ lib/bitset.h	Sat Apr 26 22:02:02 2003
@@ -23,7 +23,17 @@ Foundation, Inc., 59 Temple Place - Suit
    Only use the functions and macros defined in this file.  */
=20
 #include "bbitset.h"
+
+/* obstack.h tries to be portable to K&R compilers, but its
+   __INT_TO_PTR macro generates diagnostics on compilers like Tru64 cc
+   that define __STDC__ to 0 when not in strict ANSI mode.  The bitset
+   code assumes C89 or later, so it can avoid these glitches by
+   defining __INT_TO_PTR appropriately for C89 or later.  */
+#ifndef __INT_TO_PTR
+# define __INT_TO_PTR(P) ((void *) ((P) + (char *) 0))
+#endif
 #include "obstack.h"
+
 #include <stdio.h>
=20
 /* Attributes used to select a bitset implementation.  */



From MAILER-DAEMON Sun Apr 27 17:37:57 2003
Received: from list by monty-python.gnu.org with archive (Exim 4.10.13)
	id 199tpX-0000qt-00
	for mharc-bug-bison@gnu.org; Sun, 27 Apr 2003 17:37:03 -0400
Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.10.13)
	id 199tp8-0000ez-00
	for bug-bison@gnu.org; Sun, 27 Apr 2003 17:36:38 -0400
Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.10.13)
	id 199tny-0008Rp-00
	for bug-bison@gnu.org; Sun, 27 Apr 2003 17:35:29 -0400
Received: from vexpert.dbai.tuwien.ac.at ([128.131.111.2])
	by monty-python.gnu.org with esmtp (Exim 4.10.13)
	id 199tnr-0007zM-00
	for bug-bison@gnu.org; Sun, 27 Apr 2003 17:35:19 -0400
Received: from [128.131.111.60] (acrux [128.131.111.60])
	by vexpert.dbai.tuwien.ac.at (Postfix) with ESMTP id E559013789
	for <bug-bison@gnu.org>; Sun, 27 Apr 2003 23:35:13 +0200 (CEST)
Date: Sun, 27 Apr 2003 23:35:20 +0200 (CEST)
From: Gerald Pfeifer <pfeifer@dbai.tuwien.ac.at>
To: bug-bison@gnu.org
Message-ID: <Pine.BSF.4.53.0304272324220.94316@acrux.dbai.tuwien.ac.at>
MIME-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
Subject: bison against GCC -Wundef: one report, and one patch
X-BeenThere: bug-bison@gnu.org
X-Mailman-Version: 2.1b5
Precedence: list
List-Id: Bug reports for Bison, the GNU parser generator <bug-bison.gnu.org>
List-Help: <mailto:bug-bison-request@gnu.org?subject=help>
List-Post: <mailto:bug-bison@gnu.org>
List-Subscribe: <http://mail.gnu.org/mailman/listinfo/bug-bison>,
	<mailto:bug-bison-request@gnu.org?subject=subscribe>
List-Archive: <http://mail.gnu.org/pipermail/bug-bison>
List-Unsubscribe: <http://mail.gnu.org/mailman/listinfo/bug-bison>,
	<mailto:bug-bison-request@gnu.org?subject=unsubscribe>
X-List-Received-Date: Sun, 27 Apr 2003 21:37:02 -0000

When using gcc -Wundef to compile code generated by bison 1.875 most
of the problems that used to be flagged for earlier versions are gone
but two remain:

1) parser2.c:1482:6: warning: "YYSTACK_USE_ALLOCA" is not defined

The problem here is the first line, which should be guarded by
#ifdef YYSTACK_USE_ALLOCA:

  # if YYSTACK_USE_ALLOCA
  #  define YYSTACK_ALLOC alloca
  # else
  #  ifndef YYSTACK_USE_ALLOCA
  #   if defined (alloca) || defined (_ALLOCA_H)
  #    define YYSTACK_ALLOC alloca
  #   else
  #    ifdef __GNUC__
  #     define YYSTACK_ALLOC __builtin_alloca
  #    endif
  #   endif
  #  endif
  # endif

2) parser2.c:2161:5: warning: "YYMAXDEPTH" is not defined

Fixed by the patch below.  (Note that I'm not on this list, so I'd
appreciate a direct copy for any replies.)

Gerald

2003-04-27  Gerald Pfeifer  <gerald@pfeifer.com>

	* data/yacc.c: Check whether YYMAXDEPTH is defined before using
	it.

--- yacc.c.orig	Sat Dec 28 09:36:02 2002
+++ yacc.c	Sun Apr 27 23:30:04 2003
@@ -614,8 +614,10 @@ int yydebug;
    SIZE_MAX < YYSTACK_BYTES (YYMAXDEPTH)
    evaluated with infinite-precision integer arithmetic.  */

-#if YYMAXDEPTH == 0
-# undef YYMAXDEPTH
+#ifdef YYMAXDEPTH
+# if YYMAXDEPTH == 0
+#  undef YYMAXDEPTH
+# endif
 #endif

 #ifndef YYMAXDEPTH



From MAILER-DAEMON Mon Apr 28 07:49:05 2003
Received: from list by monty-python.gnu.org with archive (Exim 4.10.13)
	id 19A75m-0000yK-00
	for mharc-bug-bison@gnu.org; Mon, 28 Apr 2003 07:46:42 -0400
Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.10.13)
	id 19A75N-0008LY-00
	for bug-bison@gnu.org; Mon, 28 Apr 2003 07:46:17 -0400
Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.10.13)
	id 19A751-0007ra-00
	for bug-bison@gnu.org; Mon, 28 Apr 2003 07:45:56 -0400
Received: from iceage.anubex.com ([194.78.64.234])
	by monty-python.gnu.org with esmtp (Exim 4.10.13)
	id 19A74y-0007am-00
	for bug-bison@gnu.org; Mon, 28 Apr 2003 07:45:52 -0400
Received: from korbendallas (unknown [192.168.14.53])
	by iceage.anubex.com (Anubex Mail Server) with ESMTP id 80D341C0108
	for <bug-bison@gnu.org>; Mon, 28 Apr 2003 13:45:45 +0200 (CEST)
From: "Tim Van Holder" <tim.vanholder@anubex.com>
To: <bug-bison@gnu.org>
Date: Mon, 28 Apr 2003 13:44:50 +0200
Organization: Anubex
MIME-Version: 1.0
Content-Type: text/plain;
	charset="us-ascii"
Content-Transfer-Encoding: 7bit
X-Mailer: Microsoft Outlook, Build 11.0.4920
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.3718.0
Thread-Index: AcMNe5Oui5VEYqYjQqu5TTGjsHFvmw==
Message-Id: <20030428114545.80D341C0108@iceage.anubex.com>
Subject: Bad YYLEX value if %lex-param but not %pure-parser
X-BeenThere: bug-bison@gnu.org
X-Mailman-Version: 2.1b5
Precedence: list
List-Id: Bug reports for Bison, the GNU parser generator <bug-bison.gnu.org>
List-Help: <mailto:bug-bison-request@gnu.org?subject=help>
List-Post: <mailto:bug-bison@gnu.org>
List-Subscribe: <http://mail.gnu.org/mailman/listinfo/bug-bison>,
	<mailto:bug-bison-request@gnu.org?subject=subscribe>
List-Archive: <http://mail.gnu.org/pipermail/bug-bison>
List-Unsubscribe: <http://mail.gnu.org/mailman/listinfo/bug-bison>,
	<mailto:bug-bison-request@gnu.org?subject=unsubscribe>
X-List-Received-Date: Mon, 28 Apr 2003 11:46:30 -0000

Currently, if %lex-param is used, but %pure-parser is not, the YYLEX
macro gets defined with an invalid value.

e.g.

%lex-param {int foo}

causes YYLEX to be 'yylex(, foo)'


(also, b4_yyerror_args uses m4_ifset to test if any were given, while
b4_lex_param uses m4_ifdef; not sure if this matters, but it gives
the appearance of being inconsistent).


2003-04-28  Tim Van Holder <tim.van.holder@pandora.be>

	* data/yacc.c: (b4_lex_param) Corrected for the case where
	%lex-param is provided and %pure-parser isn't.

Index: data/yacc.c
===================================================================
RCS file: /cvsroot/bison/bison/data/yacc.c,v
retrieving revision 1.55
diff -u -u -p -d -r1.55 yacc.c
--- data/yacc.c	28 Apr 2003 06:03:58 -0000	1.55
+++ data/yacc.c	28 Apr 2003 10:33:24 -0000
@@ -58,8 +58,8 @@ m4_ifset([b4_parse_param], [b4_c_args(b4
 # b4_lex_param arrives quoted twice, but we want to keep only one level.
 m4_define([b4_lex_param],
 m4_dquote(b4_pure_if([[[[YYSTYPE *]], [[&yylval]]][]dnl
-b4_location_if([, [[YYLTYPE *], [&yylloc]]])])dnl
-m4_ifdef([b4_lex_param], [, ]b4_lex_param)))
+b4_location_if([, [[YYLTYPE *], [&yylloc]]])m4_ifdef([b4_lex_param], [,
])])dnl
+m4_ifdef([b4_lex_param], b4_lex_param)))
 
 




From MAILER-DAEMON Mon Apr 28 14:51:46 2003
Received: from list by monty-python.gnu.org with archive (Exim 4.10.13)
	id 19ADhj-0005CS-00
	for mharc-bug-bison@gnu.org; Mon, 28 Apr 2003 14:50:19 -0400
Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.10.13)
	id 19ADhQ-0004fh-00
	for bug-bison@gnu.org; Mon, 28 Apr 2003 14:50:00 -0400
Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.10.13)
	id 19ADgD-0003dP-00
	for bug-bison@gnu.org; Mon, 28 Apr 2003 14:48:46 -0400
Received: from tao.natur.cuni.cz ([195.113.56.1])
	by monty-python.gnu.org with esmtp (Exim 4.10.13)
	id 19ADfo-0003GB-00
	for bug-bison@gnu.org; Mon, 28 Apr 2003 14:48:20 -0400
Received: from tao.natur.cuni.cz (tao.natur.cuni.cz [195.113.56.1])
	by tao.natur.cuni.cz (8.12.9/8.12.8) with ESMTP id h3SIm8DT167036;
	Mon, 28 Apr 2003 20:48:08 +0200 (MDT)
X-Obalka-From: mmokrejs@natur.cuni.cz
Date: Mon, 28 Apr 2003 20:48:08 +0200 (CEST)
From: =?iso-8859-2?Q?Martin_MOKREJ=A9?= <mmokrejs@natur.cuni.cz>
To: bug-bison@gnu.org
Message-ID: <Pine.OSF.4.51.0304282047170.213345@tao.natur.cuni.cz>
MIME-Version: 1.0
Content-Type: TEXT/PLAIN; charset=ISO-8859-15
Content-Transfer-Encoding: quoted-printable
X-MIME-Autoconverted: from 8bit to quoted-printable by tao.natur.cuni.cz id
	h3SIm8DT167036
cc: eggert@cs.ucla.edu
Subject: RE: Bug in C compiler Compiler Bug for Case   3411658RE (fwd)
X-BeenThere: bug-bison@gnu.org
X-Mailman-Version: 2.1b5
Precedence: list
List-Id: Bug reports for Bison, the GNU parser generator <bug-bison.gnu.org>
List-Help: <mailto:bug-bison-request@gnu.org?subject=help>
List-Post: <mailto:bug-bison@gnu.org>
List-Subscribe: <http://mail.gnu.org/mailman/listinfo/bug-bison>,
	<mailto:bug-bison-request@gnu.org?subject=subscribe>
List-Archive: <http://mail.gnu.org/pipermail/bug-bison>
List-Unsubscribe: <http://mail.gnu.org/mailman/listinfo/bug-bison>,
	<mailto:bug-bison-request@gnu.org?subject=unsubscribe>
X-List-Received-Date: Mon, 28 Apr 2003 18:50:15 -0000

---------- Forwarded message ----------
From: "Belgardt, Wolfgang" <Wolfgang.Belgardt@hp.com>
To: Martin MOKREJ=A6 <mmokrejs@natur.cuni.cz>
Date: Mon, 28 Apr 2003 16:19:28 +0200
Subject: RE: Bug in C compiler Compiler Bug for Case   3411658RE (fwd)

Hello Mr. Mokrejs,

My  engineering colleagues  have talk together and they have send the fol=
lowing answer.
The program still violates that C99 standard, but for a different 	reason

>From C99:

6.3.1.2 Boolean type
   (1) When any scalar value is converted to _Bool, the result
       is 0 if the value compares equal to 0; otherwise, the
       result is 1.

6.2.5 Types
  (21) Arithmetic types and pointer types are collectively
       called scalar types.

6.7.8 Initialization (Constraints, so violation mandates a diagnostic)
   (4) All the expressions in an initializer for an object
       that has static storage duration shall be constant
       expressions or string literals.

6.6 Constant expressions
   (7) More latitude is permitted for constant expressions in
       initializers.  Such a constant expression shall be,
       or evaluate to, one of the following:
        - an arithmetic constant expression,
        - a null pointer constant,
        - an address constant,
        - an address constant for an object type plus or minus an
          integer constant expression.

   (8) An arithmetic constant expression shall have arithmetic
       type and shall only have operands that are integer constants,
       floating constants, enumeration constants, character
       constants, and sizeof expressions.  Cast operators in
       an arithmetic constant expression shall only convert
       arithmetic type to arithmetic types, except as part
       of an operand to a sizeof operator whose result is
       an integer constant.

   (9) An address constant is a null pointer, a pointer to
       an lvalue designating an object of static storage
       duration, or a pointer to a function designator;
       it shall be created explicitly using the unary &
       operator or an integer constant cast to pointer type,
       or implicitly by the use of an expression of array or
       function type.  The array-subscript [] and member-access
       . and -> operators, the address & and indirection *
       unary operators, and pointer casts may be used
       in the creation of an address constant, but the
       value of an object shall not be accessed by use
       of these operators.

The construct at hand involves an initializer for an
object with static storage duration, so it is a
constraint that the expression be a constant expression
or a string literal.  Since it isn't a string literal,
it must be one of the "relaxed" forms of constant
expression enumerated in 6.6(7).  (_Bool)&foo is clearly
not a null pointer constant, an address constant, or
an address constant for an object type plus or minus
an integer constant expression.  Therefore it can
only statisfy the constraint if it is an arithmetic
constant expression.  But it is not an arithmetic
constant expression because it contains an operand,
&foo, that is not an integer constant, floating constant,
enumeration constant, character constant, or a sizeof
expression.  And even if &foo were considered to be
an arithmetic constant expression, (_Bool)&foo would
still not be an arithmetic constant expression because
it contains a cast that does not convert from one
arithmetic type to another.

So the expression (_Bool)&foo violates a constraint
if it is used as an initializer for an object
of static storage duration, and a strictly-conforming
implementation must issue a diagnostic.

Informally, note that the definition of converting a
scalar value to type _Bool requires that the value
be compared to 0.  Since the address of an object
with static storage duration is not known until
link time, producing the correct result requires
that the compare operation happen at link time
or later.  So either the object module language
and linker would need to support such a comparison
operator, or else the comparison must be done at
run-time during some kind of "init" phase.  This is
not a problem for C++, which requires support for
run-time innitialization of objects with static
storage duration, but the C99 language does not
require such support.  And many/most? object
languages and linkers do not support a comparison
operator.  Thus producing the correct result
for this initialization would place a new and
unique requirement on the C implementation that
is not needed for any other feature in the language.

A possible response to the practical consideration
above is that since &foo requires a declaration of
foo, and a declaration used in an expression requires
that a definition exist somewhere in the compilation
units of the program, and that a pointer to an
object that exists is not a null pointer, and a
pointer value that compares equal to 0 is a null
pointer, then a compiler could simply evaluate the
expression as 1 without requiring any link-time
or run-time evaluation.  However, in the realm of
practical considerations, it should be noted that
it is a common practice on some platforms to use
weak symbol references to determine whether or
not a given "optional" module has been linked
into a program; typically the address of such a
weak symbol will be zero if the module is not
present: an expression such as (_Bool)&foo would
be a sensible construct to use to determine whether
or not the module defining foo had been linked
in - having the compiler treat it as a compile-time
constant 1 would defeat that practical usage.

Bottom line: formally it is a constaint violation.
And practically producing the practically correct
result places a burden on the C implementation
that is not needed by any other construct in
the C99 language.


Mit freundlichen Gr=FCssen / Kind Regards


Wolfgang Belgardt
Customer Support Consultant

Hewlett-Packard GmbH
Customer Support
Bonsiepen 5
D-45136 Essen
Phone: ++49 (0) 201 2663 258
Fax:    	 ++49 (0) 201 2663 200
mobil: 	  +49 (0171 3357 256)
E-mail:  Wolfgang.Belgardt@hp.com
http://www.hp.com/de
_________________________________________________________________________=
_________
Hewlett-Packard GmbH
Gesch=E4ftsf=FChrer: J=F6rg Menno Harms (Vorsitzender), J=FCrgen Banhardt=
, Wolfram Fischer,
 Rainer Kaczmarczyk, B=E4rbel Schmidt, Fritz Schuller, Regine Stachelhaus
Vorsitzender des Aufsichtsrats: Heribert Schmitz
Sitz der Gesellschaft: B=F6blingen, Amtsgericht B=F6blingen HRB 4081

-----Original Message-----
From: Martin MOKREJ=A9 [mailto:mmokrejs@natur.cuni.cz]
Sent: Friday, April 25, 2003 11:51
To: Belgardt, Wolfgang
Subject: Re: Bug in C compiler Compiler Bug for Case 3411658RE (fwd)

Could you please forward?

--
Martin Mokrejs <mmokrejs@natur.cuni.cz>, <m.mokrejs@gsf.de>
PGP5.0i key is at http://www.natur.cuni.cz/~mmokrejs
MIPS / Institute for Bioinformatics <http://mips.gsf.de>
GSF - National Research Center for Environment and Health
Ingolstaedter Landstrasse 1, D-85764 Neuherberg, Germany
tel.: +49-89-3187 3683 , fax: +49-89-3187 3585

---------- Forwarded message ----------
From: Paul Eggert <eggert@cs.ucla.edu>
To: Martin MOKREJ=A9 <mmokrejs@natur.cuni.cz>
Cc: bug-bison@gnu.org
Date: 24 Apr 2003 13:55:45 -0700
Subject: Re: Bug in C compiler Compiler Bug for Case   3411658RE (fwd)

Martin MOKREJ(c) <mmokrejs@natur.cuni.cz> writes:

> So, what to do now? ;)

Please refer them to section 6.3.1.2 of the C99 standard, which states:

    When any scalar value is converted to _Bool, the
    result is 0 if the value compares equal to 0;
    otherwise, the result is 1.

You can also refer them to HP's own documentation:

   When any scalar value is converted to _Bool, the result is 0 if the
   value compares equal to 0 (for example, if the pointer is
   NULL). Otherwise, the result is 1. This is one way the _Bool type is
   different than the other integer types.
   <http://h30097.www3.hp.com/dtk/Compaq_C_Compiler/doc/lrm/DOCU0006.HTM>


> From: "Belgardt, Wolfgang" <Wolfgang.Belgardt@hp.com>
> Date: Thu, 24 Apr 2003 15:14:14 +0200

>   To quote from the C99 standard,
>       section 6.3.2.3 (conversions involving pointers), paragraph 6 sta=
tes:
>
>       "Any pointer type may be converted to an integer type.  Except as
>        previously specified, the result is implementation defined.  If =
the
>       result cannot be represented in the integer type, the behavior is
>       undefined."
>
>       As a _Bool can not hold the values of an address the Standard cle=
arly
>       defines this as undefined behavior.

The behavior is undefined only if it is not "previously specified".
Section 6.3.1.2 provides the "previous specification" in this case.

>       There is no ability in Tru64 to tell the linker/loader "If
>       this symbol is defined deposit a 1 here, if not put a zero
>       here".

I don't see why that capability is needed.  The address of an object
is always non-NULL, so if x is an object then (_Bool)&x always
evaluates to 1.  HP doesn't need to modify its linker/loader to handle
this case.



From MAILER-DAEMON Mon Apr 28 16:57:52 2003
Received: from list by monty-python.gnu.org with archive (Exim 4.10.13)
	id 19AFgv-0000ST-00
	for mharc-bug-bison@gnu.org; Mon, 28 Apr 2003 16:57:37 -0400
Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.10.13)
	id 19AFgO-00086R-00
	for bug-bison@gnu.org; Mon, 28 Apr 2003 16:57:04 -0400
Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.10.13)
	id 19AFfv-0007hp-00
	for bug-bison@gnu.org; Mon, 28 Apr 2003 16:56:36 -0400
Received: from kiwi.cs.ucla.edu ([131.179.128.19])
	by monty-python.gnu.org with esmtp (Exim 4.10.13)
	id 19AFfq-0007bt-00
	for bug-bison@gnu.org; Mon, 28 Apr 2003 16:56:30 -0400
Received: (from eggert@localhost)
	by kiwi.cs.ucla.edu (8.11.7+Sun/8.11.6/UCLACS-5.2) id h3SKuIc01236;
	Mon, 28 Apr 2003 13:56:18 -0700 (PDT)
To: =?iso-8859-15?q?Martin_MOKREJ=A6?= <mmokrejs@natur.cuni.cz>
References: <Pine.OSF.4.51.0304282047170.213345@tao.natur.cuni.cz>
From: Paul Eggert <eggert@CS.UCLA.EDU>
Date: 28 Apr 2003 13:56:18 -0700
In-Reply-To: <Pine.OSF.4.51.0304282047170.213345@tao.natur.cuni.cz>
Message-ID: <vi8n0ianxxp.fsf@cs.ucla.edu>
Lines: 49
User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.3
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
cc: bug-bison@gnu.org
Subject: Re: Bug in C compiler Compiler Bug for Case   3411658RE (fwd)
X-BeenThere: bug-bison@gnu.org
X-Mailman-Version: 2.1b5
Precedence: list
List-Id: Bug reports for Bison, the GNU parser generator <bug-bison.gnu.org>
List-Help: <mailto:bug-bison-request@gnu.org?subject=help>
List-Post: <mailto:bug-bison@gnu.org>
List-Subscribe: <http://mail.gnu.org/mailman/listinfo/bug-bison>,
	<mailto:bug-bison-request@gnu.org?subject=subscribe>
List-Archive: <http://mail.gnu.org/pipermail/bug-bison>
List-Unsubscribe: <http://mail.gnu.org/mailman/listinfo/bug-bison>,
	<mailto:bug-bison-request@gnu.org?subject=unsubscribe>
X-List-Received-Date: Mon, 28 Apr 2003 20:57:35 -0000

[Martin, can you please forward this message to HP support?  Thanks.]

> From: "Belgardt, Wolfgang" <Wolfgang.Belgardt@hp.com>
> Date: Mon, 28 Apr 2003 16:19:28 +0200

> The construct at hand involves an initializer for an
> object with static storage duration, so it is a
> constraint that the expression be a constant expression
> or a string literal.  Since it isn't a string literal,
> it must be one of the "relaxed" forms of constant
> expression enumerated in 6.6(7).  (_Bool)&foo is clearly
> not a null pointer constant, an address constant, or
> an address constant for an object type plus or minus
> an integer constant expression.

There must be some confusion here, due to later discussion on the
subject.  Let's go back to an extract from the original program that
started this thread:

  #include <stdbool.h>
  struct s { _Bool s: 1; _Bool t; } s;
  bool e = &s;

There is no cast here, and the expression "&s" is clearly a constant
expression, so it is valid C99.

> Since the address of an object with static storage duration is not
> known until link time, producing the correct result requires that
> the compare operation happen at link time or later.

Not in this case, since &s cannot possibly be zero.

> a compiler could simply evaluate the expression as 1 without
> requiring any link-time or run-time evaluation.

Yes, that's correct.

> However, in the realm of practical considerations, it should be
> noted that it is a common practice on some platforms to use weak
> symbol references

Such practice is beyond the scope of the C99 standard.  Weak symbols
are an extension to C99, and C99 compilers that support them as
extensions can place extra restrictions on them.

In other words, a C99 compiler can prohibit "bool e = &s;" if "s" is a
weak symbol reference, without violating the C99 standard, since one
cannot declare a weak symbol in pure C99.  However, the program
fragment quoted above must be accepted by any valid C99 compiler.



From MAILER-DAEMON Tue Apr 29 02:06:41 2003
Received: from list by monty-python.gnu.org with archive (Exim 4.10.13)
	id 19AOGH-0001gw-00
	for mharc-bug-bison@gnu.org; Tue, 29 Apr 2003 02:06:41 -0400
Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.10.13)
	id 19AOGE-0001fU-00
	for bug-bison@gnu.org; Tue, 29 Apr 2003 02:06:38 -0400
Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.10.13)
	id 19AOGD-0001f3-00
	for bug-bison@gnu.org; Tue, 29 Apr 2003 02:06:37 -0400
Received: from kiwi.cs.ucla.edu ([131.179.128.19])
	by monty-python.gnu.org with esmtp (Exim 4.10.13)
	id 19AOEg-0001Mr-00; Tue, 29 Apr 2003 02:05:02 -0400
Received: (from eggert@localhost)
	by kiwi.cs.ucla.edu (8.11.7+Sun/8.11.6/UCLACS-5.2) id h3T64aI25135;
	Mon, 28 Apr 2003 23:04:36 -0700 (PDT)
To: "Tim Van Holder" <tim.vanholder@anubex.com>
References: <20030428114545.80D341C0108@iceage.anubex.com>
From: Paul Eggert <eggert@CS.UCLA.EDU>
Date: 28 Apr 2003 23:04:36 -0700
In-Reply-To: <20030428114545.80D341C0108@iceage.anubex.com>
Message-ID: <vi8ptn5vnyj.fsf@cs.ucla.edu>
Lines: 15
User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.3
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
cc: bison-patches@gnu.org
cc: bug-bison@gnu.org
Subject: Re: Bad YYLEX value if %lex-param but not %pure-parser
X-BeenThere: bug-bison@gnu.org
X-Mailman-Version: 2.1b5
Precedence: list
List-Id: Bug reports for Bison, the GNU parser generator <bug-bison.gnu.org>
List-Help: <mailto:bug-bison-request@gnu.org?subject=help>
List-Post: <mailto:bug-bison@gnu.org>
List-Subscribe: <http://mail.gnu.org/mailman/listinfo/bug-bison>,
	<mailto:bug-bison-request@gnu.org?subject=subscribe>
List-Archive: <http://mail.gnu.org/pipermail/bug-bison>
List-Unsubscribe: <http://mail.gnu.org/mailman/listinfo/bug-bison>,
	<mailto:bug-bison-request@gnu.org?subject=unsubscribe>
X-List-Received-Date: Tue, 29 Apr 2003 06:06:39 -0000

"Tim Van Holder" <tim.vanholder@anubex.com> writes in
<http://mail.gnu.org/archive/html/bug-bison/2003-04/msg00045.html>:

> (b4_yyerror_args uses m4_ifset to test if any were given, while
> b4_lex_param uses m4_ifdef; not sure if this matters, but it gives
> the appearance of being inconsistent).

Good point; I'll let Akim field this one, since he knows that code
better.


> 	* data/yacc.c: (b4_lex_param) Corrected for the case where
> 	%lex-param is provided and %pure-parser isn't.

Thanks for the patch.  I applied it.



From MAILER-DAEMON Tue Apr 29 19:30:59 2003
Received: from list by monty-python.gnu.org with archive (Exim 4.10.13)
	id 19AeY1-0000Om-00
	for mharc-bug-bison@gnu.org; Tue, 29 Apr 2003 19:30:05 -0400
Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.10.13)
	id 19AeXV-00088I-00
	for bug-bison@gnu.org; Tue, 29 Apr 2003 19:29:33 -0400
Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.10.13)
	id 19AeX6-0007Gt-00
	for bug-bison@gnu.org; Tue, 29 Apr 2003 19:29:15 -0400
Received: from kiwi.cs.ucla.edu ([131.179.128.19])
	by monty-python.gnu.org with esmtp (Exim 4.10.13)
	id 19AeWh-0006Be-00
	for bug-bison@gnu.org; Tue, 29 Apr 2003 19:28:43 -0400
Received: (from eggert@localhost)
	by kiwi.cs.ucla.edu (8.11.7+Sun/8.11.6/UCLACS-5.2) id h3TNSah10371;
	Tue, 29 Apr 2003 16:28:36 -0700 (PDT)
To: "Belgardt, Wolfgang" <Wolfgang.Belgardt@hp.com>
References: <444D5287DE2BFD49A0DE25495160DCA214EA04@rtoexc01.emea.cpqcorp.net>
From: Paul Eggert <eggert@CS.UCLA.EDU>
Date: 29 Apr 2003 16:28:36 -0700
In-Reply-To: <444D5287DE2BFD49A0DE25495160DCA214EA04@rtoexc01.emea.cpqcorp.net>
Message-ID: <vi8u1cgx4rf.fsf@cs.ucla.edu>
Lines: 64
User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.3
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
cc: =?iso-8859-15?q?Martin_MOKREJ=A6?= <mmokrejs@natur.cuni.cz>
cc: bug-bison@gnu.org
Subject: Re: Bug in C compiler Compiler Bug for Case   3411658RE (fwd)
X-BeenThere: bug-bison@gnu.org
X-Mailman-Version: 2.1b5
Precedence: list
List-Id: Bug reports for Bison, the GNU parser generator <bug-bison.gnu.org>
List-Help: <mailto:bug-bison-request@gnu.org?subject=help>
List-Post: <mailto:bug-bison@gnu.org>
List-Subscribe: <http://mail.gnu.org/mailman/listinfo/bug-bison>,
	<mailto:bug-bison-request@gnu.org?subject=subscribe>
List-Archive: <http://mail.gnu.org/pipermail/bug-bison>
List-Unsubscribe: <http://mail.gnu.org/mailman/listinfo/bug-bison>,
	<mailto:bug-bison-request@gnu.org?subject=unsubscribe>
X-List-Received-Date: Tue, 29 Apr 2003 23:30:04 -0000

"Belgardt, Wolfgang" <Wolfgang.Belgardt@hp.com> writes:

> This is this responds from c++ engineering:

Thanks for following up on this, but it appears that we're at a dead end.
It sounds like the C++ engineering team did not read my latest message
(enclosed below), as they did not respond to any of its points.

Until HP fixes the bug where Compaq C rejects the "bool e = &s" shown below,
most GNU software won't use Compaq C's implementation of the boolean data type.
Perhaps that's for the best, at least in the shorter term.
In the longer term HP can switch to GCC.


> From: Paul Eggert <eggert@CS.UCLA.EDU>
> Date: 28 Apr 2003 13:56:18 -0700
>
> > From: "Belgardt, Wolfgang" <Wolfgang.Belgardt@hp.com>
> > Date: Mon, 28 Apr 2003 16:19:28 +0200
> 
> > The construct at hand involves an initializer for an
> > object with static storage duration, so it is a
> > constraint that the expression be a constant expression
> > or a string literal.  Since it isn't a string literal,
> > it must be one of the "relaxed" forms of constant
> > expression enumerated in 6.6(7).  (_Bool)&foo is clearly
> > not a null pointer constant, an address constant, or
> > an address constant for an object type plus or minus
> > an integer constant expression.
> 
> There must be some confusion here, due to later discussion on the
> subject.  Let's go back to an extract from the original program that
> started this thread:
> 
>   #include <stdbool.h>
>   struct s { _Bool s: 1; _Bool t; } s;
>   bool e = &s;
> 
> There is no cast here, and the expression "&s" is clearly a constant
> expression, so it is valid C99.
> 
> > Since the address of an object with static storage duration is not
> > known until link time, producing the correct result requires that
> > the compare operation happen at link time or later.
> 
> Not in this case, since &s cannot possibly be zero.
> 
> > a compiler could simply evaluate the expression as 1 without
> > requiring any link-time or run-time evaluation.
> 
> Yes, that's correct.
> 
> > However, in the realm of practical considerations, it should be
> > noted that it is a common practice on some platforms to use weak
> > symbol references
> 
> Such practice is beyond the scope of the C99 standard.  Weak symbols
> are an extension to C99, and C99 compilers that support them as
> extensions can place extra restrictions on them.
> 
> In other words, a C99 compiler can prohibit "bool e = &s;" if "s" is a
> weak symbol reference, without violating the C99 standard, since one
> cannot declare a weak symbol in pure C99.  However, the program
> fragment quoted above must be accepted by any valid C99 compiler.



