bug-bison
[Top][All Lists]
Advanced

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

Re: cp/parse.y:2120: invalid value: $3


From: Paul Eggert
Subject: Re: cp/parse.y:2120: invalid value: $3
Date: Mon, 29 Apr 2002 16:22:00 -0700 (PDT)

> Date: Mon, 29 Apr 2002 18:16:40 -0400
> From: Jakub Jelinek <address@hidden>
> 
> I think it is still better to avoid this dirty hack altogether:
> http://gcc.gnu.org/ml/gcc-bugs/2002-04/msg01335.html

OK, but here is a more conservative patch that also avoids the dirty
hack.  This patch avoids grammar rule duplication and should be a bit
easier to maintain.


2002-04-29  Paul Eggert  <address@hidden>

        * parse.y (nomods_initdcl0): Do not move stack entries
        when setting things up as initdcl0_innards expects.
        This avoids a typo caught by CVS Bison; let's buy Akim
        Demaille a beer!


*** parse.y     2002-04-29 14:43:20.511360000 -0700
--- parse.y-fix 2002-04-29 16:17:35.996361000 -0700
***************
*** 2147,2158 ****
          ;
    
  nomods_initdcl0:
            notype_declarator maybeasm
-             { /* Set things up as initdcl0_innards expects.  */
-             $<ttype>3 = $2;
-             $2 = $1; 
-               $<ftype>1.t = NULL_TREE;
-             $<ftype>1.lookups = NULL_TREE; }
            initdcl0_innards 
              {}
        | constructor_declarator maybeasm maybe_attribute
--- 2147,2156 ----
          ;
    
  nomods_initdcl0:
+           { /* Set things up as initdcl0_innards expects.  */
+             $<ftype>$.t = NULL_TREE;
+             $<ftype>$.lookups = NULL_TREE; }
            notype_declarator maybeasm
            initdcl0_innards 
              {}
        | constructor_declarator maybeasm maybe_attribute



reply via email to

[Prev in Thread] Current Thread [Next in Thread]