https://gcc.gnu.org/bugzilla/show_bug.cgi?id=117785

--- Comment #27 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
(In reply to Hana Dusíková from comment #26)
> (In reply to Jakub Jelinek from comment #25)
> > In the end this is done only for classes derived from std::exception, to
> > match e.g. the verbose terminate handler at runtime.
> 
> I wonder why?

Jason Merrill asked for that during patch review:
https://gcc.gnu.org/pipermail/gcc-patches/2025-July/688997.html
"This will work for any class type with a what() method, which is 
different from vterminate.cc that only calls what() for a type derived 
from std::exception.  I think it makes sense to be consistent with that; 
a what() from an unrelated class might mean something different."

Reply via email to