https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113158
--- Comment #7 from GCC Commits <cvs-commit at gcc dot gnu.org> --- The releases/gcc-13 branch has been updated by Marek Polacek <mpola...@gcc.gnu.org>: https://gcc.gnu.org/g:c22c3a743d9827e58b9ff11a09d7227500c0dae3 commit r13-9297-gc22c3a743d9827e58b9ff11a09d7227500c0dae3 Author: Marek Polacek <pola...@redhat.com> Date: Thu Feb 15 17:07:43 2024 -0500 c++: wrong looser excep spec for dep noexcept [PR113158] Here we find ourselves in maybe_check_overriding_exception_spec in a template context where we can't instantiate a dependent noexcept. That's OK, but we have to defer the checking otherwise we give wrong errors. PR c++/113158 gcc/cp/ChangeLog: * search.cc (maybe_check_overriding_exception_spec): Defer checking when a noexcept couldn't be instantiated & evaluated to false/true. gcc/testsuite/ChangeLog: * g++.dg/cpp0x/noexcept83.C: New test. (cherry picked from commit 876fa432ef4074053fa65b1855e7d43320515576)