bug-bison
[Top][All Lists]
Advanced

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

Re: Regression in Bison 3.2 with variant semantic values in C++ parsers


From: Akim Demaille
Subject: Re: Regression in Bison 3.2 with variant semantic values in C++ parsers
Date: Tue, 20 Nov 2018 18:33:40 +0100

Hi Sébastien.

> Le 20 nov. 2018 à 15:21, Sébastien Villemot <address@hidden> a écrit :
> 
> Dear Bison developers,
> 
> Between Bison 3.0 and 3.2, a regression has appeared in C++ parsers
> with variant semantic values. More precisely, it is no longer possible
> to use a C++ type which has a comma in it (e.g. pair<int,int>), since
> that interferes with a macro that has been introduced.
> 
> I attach a minimal example. It compiles fine with Bison 3.0, but with
> Bison 3.2 I get:
> 
> In file included from test.yy:7:
> test.tab.hh:507:77: error: macro "YY_RVREF" passed 2 arguments, but takes 
> just 1
>        basic_symbol (typename Base::kind_type t, YY_RVREF 
> (std::pair<int,int>) v);
>                                                                              ^
> test.tab.cc:178:101: error: macro "YY_RVREF" passed 2 arguments, but takes 
> just 1
>    parser::basic_symbol<Base>::basic_symbol (typename Base::kind_type t, 
> YY_RVREF (std::pair<int,int>) v)
>                                                                               
>                        ^
> In file included from test.yy:7:
> test.tab.hh:507:49: error: 'YY_RVREF' has not been declared
>        basic_symbol (typename Base::kind_type t, YY_RVREF 
> (std::pair<int,int>) v);
>                                                  ^~~~~~~~
> test.tab.cc:178:73: error: 'YY_RVREF' has not been declared
>    parser::basic_symbol<Base>::basic_symbol (typename Base::kind_type t, 
> YY_RVREF (std::pair<int,int>) v)
>                                                                          
> ^~~~~~~~
> 
> Maybe you don't consider this as a bug (since it can be easily worked
> around with a typedef/using), but at the very least it should be
> documented.

Rest assured that this is definitely a bug.  A stupid one actually.

I’ll wrap a 3.2.2 asap.

What project was hit?


reply via email to

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