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

Akim Demaille akim@epita.fr
Tue Apr 30 11:57:00 GMT 2002


I said:
| >>>>> "Jason" == Jason Merrill <jason@redhat.com> writes:
| >>>>> "Mark" == Mark Mitchell <mark@codesourcery.com> writes:
| >> --On Monday, April 29, 2002 04:22:00 PM -0700 Paul Eggert
| >> <eggert@twinsun.com> wrote:
| 
| So I would suggest, based on my understanding, the following code:
| 
| nomods_initdcl0:
|           notype_declarator maybeasm
|             { 
|               /* Reset some fields in the $0 of initdcl0_innards. */
|               $<ftype>1.t = NULL_TREE;
|               $<ftype>1.lookups = NULL_TREE; 
|               /* Because of this mid-rule action, arguments are
|                  shifted: move them as if this action did not exist. */
|               $<ftype>$ = $<ftype>2;    /* Prepare $0 in initdcl0_innards as notype_declarator. */
|               $<ttype>2 = $<ttype>1;    /* Prepare $-1 in initdcl0_innards as maybeasm. */
|               $<ttype>1 = $<ttype>0;    /* Prepare $-2 in initdcl0_innards as datadecl. */
|              }
|           initdcl0_innards
|             {}

The comments are wrong, read:

nomods_initdcl0:
          notype_declarator maybeasm
            { 
              /* Reset some fields in the $0 of initdcl0_innards. */
              $<ftype>1.t = NULL_TREE;
              $<ftype>1.lookups = NULL_TREE; 
              /* Because of this mid-rule action, arguments are
                 shifted: move them as if this action did not exist. */
              $<ftype>$ = $<ftype>2;    /* Prepare $0 in initdcl0_innards as maybeasm. */
              $<ttype>2 = $<ttype>1;    /* Prepare $-1 in initdcl0_innards as notype_declarator. */
              $<ttype>1 = $<ttype>0;    /* Prepare $-2 in initdcl0_innards as tempate_datadef or datadef. */
             }
          initdcl0_innards
            {}



More information about the Gcc-bugs mailing list