[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Regression in Bison 3.2 with variant semantic values in C++ parsers
From: |
Sébastien Villemot |
Subject: |
Regression in Bison 3.2 with variant semantic values in C++ parsers |
Date: |
Tue, 20 Nov 2018 15:21:44 +0100 |
[Please CC me on replies, I'm not subscribed to the list]
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.
Best,
--
⢀⣴⠾⠻⢶⣦⠀ Sébastien Villemot
⣾⠁⢠⠒⠀⣿⡁ Debian Developer
⢿⡄⠘⠷⠚⠋⠀ http://sebastien.villemot.name
⠈⠳⣄⠀⠀⠀⠀ http://www.debian.org
test.yy
Description: Text Data
signature.asc
Description: This is a digitally signed message part
- Regression in Bison 3.2 with variant semantic values in C++ parsers,
Sébastien Villemot <=