Re: [PATCH 00/14] glr2.cc: fix linking conflicts
Tom Shields via Bug fixes and other improvements to Bison <[email protected]> Sun, 12 Sep 2021 13:50:08 -0500
| Newsgroups | gmane.comp.parsers.bison.patches |
|---|---|
| Message-ID | <[email protected]> |
Akim,
The Ox attribute grammar evaluator generator compiles, links, and passes =
its regression tests under macOS Big Sur (v11.5.2) using this version of =
Bison with the following C++ compilers:
- Xcode (12.5.1): g++ reports its version as =E2=80=98Apple clang =
version 12.0.5 (clang-1205.0.22.11)
- GNU (Homebrew): g++ reports its version as =E2=80=98Homebrew GCC =
11.2.0) 11.1.0=E2=80=99
- LLVM (Homebrew): clang++ reports it version as =E2=80=98Homebrew clang =
version 12.0.1'
=20
Powered by Mailbutler =
<https://www.mailbutler.io/?utm_source=3Dwatermark&utm_medium=3Demail&utm_=
campaign=3Dwatermark-essential-email>, the email extension that does it =
all
I don=E2=80=99t currently have the time to run the regression test suite =
over the full set of portability configurations. I hope to get to that =
later this coming week.
Thanks!
Tom
> On Sep 12, 2021, at 7:07 AM, Akim Demaille <[email protected]> =
wrote:
>=20
> This series of patches was prompted by Tom Shields, who reported that
> using several glr2.cc parsers together leads to either linking
> conflicts or undefined behavior (probably because of One Definition
> Rule violations).
>=20
> According to my tests, we should no longer have such issues. However
> my tests are weak, and a real world check would be most interesting.
> So, users of glr2.cc (especially you, Tom), please test this tarball,
> and report the result.
>=20
> =
https://www.lrde.epita.fr/~akim/private/bison/bison-3.8.1.21-21068.tar.gz
> =
https://www.lrde.epita.fr/~akim/private/bison/bison-3.8.1.21-21068.tar.lz
> =
https://www.lrde.epita.fr/~akim/private/bison/bison-3.8.1.21-21068.tar.xz
>=20
> I have not yet installed these patches. I will in the near future (in
> case there were comments).
>=20
> Cheers!
>=20
> PS/ The diffs are `diff -w`, to avoid all the reindentation noise.
>=20
> Akim Demaille (14):
> glr2.cc: don't publish YY_EXCEPTIONS
> glr2.cc: put semantic_option into an unnamed namespace
> glr2.cc: prefer unnamed namespace to 'static'
> glr2.cc: put create_state_set_index in unnamed namespace
> glr2.cc: move glr_stack and glr_state into the parser class
> glr2.cc: style: clarify control flow
> glr2.cc: move state_stack into the unnamed namespace
> glr2.cc: put glr_state_set and glr_stack_item in unnamed namespace
> glr2.cc: prefer using, and remove useless type aliases
> glr2.cc: use only symbol_kind_type, not yysymbol_kind_t
> glr2.cc: move strong_index_alias into the unnamed namespace
> glr2.cc: check linking conflicts
> glr2.cc: kill trailing white spaces
> glr2.cc: don't pass %parse-param to destroy
>=20
> data/skeletons/glr2.cc | 4444 ++++++++++++++++++++--------------------
> tests/headers.at | 13 +-
> 2 files changed, 2251 insertions(+), 2206 deletions(-)
>=20
> --=20
> 2.32.0
>=20