On Mon Jun 15, 2026 at 11:38 PM WEST, Andrew Pinski wrote:
> So looking into a previous GSoC on exceptions handling. I noticed the
> same_or_derived_type function in tree-eh.cc on
> https://gcc.gnu.org/cgit/gcc/log/?h=devel/nothrow-detection branch.
> It looks exactly what you need here.
>
> Thanks,
> Andrea
>

same_or_derived_type covers the structural cases well, but C++ catch
matching also depends on base accessibility and ambiguity per
[except.handle], which odr_equivalent_or_derived_p doesn't model since
it's about ODR identity rather than access. The langhook delegates to
can_convert_eh to keep those rules in the FE where they're already
correct. Also, it's only on devel/nothrow-detection, not trunk.

Thanks,
Egas

Reply via email to