gnu /
bison /
722070124e991ee93ec3ffbde631b5f3713cd9f0 lalr1.cc: declare stack_symbol_type as noexcept
Many C++ tests (400-25, 440-53, 664-5, 667-76, 679-80, 682-3, 685-9,
692) failed with GCC 12.1:
```
test.cc:843:28: required from here
/opt/local/include/gcc12/c++/bits/stl_construct.h:95:14: error: noexcept-expression evaluates to 'false' because of a call to 'yy::parser::stack_symbol_type::stack_symbol_type()' [-Werror=noexcept]
95 | noexcept(noexcept(::new((void*)0) _Tp(std::declval<_Args>()...)))
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
test.cc:990:3: note: but 'yy::parser::stack_symbol_type::stack_symbol_type()' does not throw; perhaps it should be declared 'noexcept'
990 | parser::stack_symbol_type::stack_symbol_type ()
| ^~~~~~
```
Reported by Paul Eggert.
<https://lists.gnu.org/r/bison-patches/2022-07/msg00008.html>
* data/skeletons/lalr1.cc (stack_symbol_type::stack_symbol_type()):
Declare noexcept.
1 file changed