[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: |
Sébastien Villemot |
Subject: |
Re: Regression in Bison 3.2 with variant semantic values in C++ parsers |
Date: |
Wed, 21 Nov 2018 10:33:08 +0100 |
Le mardi 20 novembre 2018 à 18:33 +0100, Akim Demaille a écrit :
> Le 20 nov. 2018 à 15:21, Sébastien Villemot <address@hidden> a écrit :
> > 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.
Great, thanks. I confirm that your bison-3.2.1.9-1e55d.tar.xz tarball
fixes the issue. So I'm looking forward for the 3.2.2 release.
> What project was hit?
Dynare (see http://www.dynare.org)
I pushed the following workaround:
https://git.dynare.org/Dynare/preprocessor/commit/e22aa1c16258fc48bcfb53fde4a098899fce2d12
So far no numbered release is affected, the problem only affects the
development branch (where we recently took advantage of variant
semantic types).
Best,
--
⢀⣴⠾⠻⢶⣦⠀ Sébastien Villemot
⣾⠁⢠⠒⠀⣿⡁ Debian Developer
⢿⡄⠘⠷⠚⠋⠀ http://sebastien.villemot.name
⠈⠳⣄⠀⠀⠀⠀ http://www.debian.org
signature.asc
Description: This is a digitally signed message part