This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
Re: cp/parse.y:2120: invalid value: $3
- From: Paul Eggert <eggert at twinsun dot com>
- To: nathan at cs dot bris dot ac dot uk
- Cc: akim at epita dot fr, bug-gcc at gnu dot org, bug-bison at gnu dot org, mark at codesourcery dot com
- Date: Mon, 29 Apr 2002 13:19:56 -0700 (PDT)
- Subject: Re: cp/parse.y:2120: invalid value: $3
- References: <mv4it6fls5j.fsf@nostromo.lrde.epita.fr> <mv4heluitf3.fsf@nostromo.lrde.epita.fr> <3CCDA2B3.5F719933@acm.org>
> Date: Mon, 29 Apr 2002 20:44:51 +0100
> From: Nathan Sidwell <nathan@acm.org>
> > | nomods_initdcl0:
> > | notype_declarator maybeasm
> > | { /* Set things up as initdcl0_innards expects. */
> > | ===> $<ttype>3 = $2;
> there are lots of places (55 to be precise) in parse.y which say
> $<ttype>N. Is this the only wrong one?
Yes.
It's wrong because there is no $3 at that point. The mid-rule action
follows the 2nd nonterminal on the right hand side, so there is only a
$1 and a $2 at that point.
Most likely $<ttype>$ was intended, but it's possible that there is
a subtler bug here (I haven't looked into it).