bug-bison
[Top][All Lists]
Advanced

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

Re: Another - Bison 1.35 works but Bison 1.50 Doesn't


From: Paul Eggert
Subject: Re: Another - Bison 1.35 works but Bison 1.50 Doesn't
Date: Sun, 13 Oct 2002 22:11:43 -0700 (PDT)

> From: Akim Demaille <address@hidden>
> Date: 13 Oct 2002 16:31:53 +0200
> 
> I also matched Byacc's behavior, IIRC.

byacc does not complain about his test grammar (vcc.y), so in this
particular case Bison 1.50 generates a diagnostic that byacc does not.

> (I have not checked, this is just by memory) Bison used to check properly
> 
>         foo: bar baz;
> 
> but *not*
> 
>         foo: bar {} baz;
> 
> because the code was written in such a way that the test was fooled by
> the presence of a mid-rule action.

Good memory!  Yes, the three warnings generated by vcc.y all fall into
this category.  In other words, if I remove the mid-rule actions, Bison
1.28 (say) warns about the rules with a diagnostic like this:

  vcc.y:212: type clash (`' `vobj') on default action

However, my argument is that even the 1.28 warning is unnecessary when
the left-hand-side type is `' (i.e., unspecified), since the type
clash doesn't matter in that case, as the right-hand-side value is
being discarded in this case.  This issue is independent of whether a
mid-rule action is specified.

I just checked, and byacc does not warn about this particular case,
regardless of whether the mid-rule actions are present.  So I think
we're OK from a compatibility standpoint.




reply via email to

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