GNU Tools Cauldron 2025

GNU Tools Cauldron 2025

Handling C++ Exception Hierarchies in Ada
2025-09-28 , Auditorium B001 (170)

GNAT already offered mechanisms to handle C++ exceptions, but they were
limited to exact class type matches. This presentation covers the
extensions to Ada syntax, runtime and library to enable Ada subprograms
to catch and handle C++ exceptions hierarchies, and to reference the
raised C++ (sub-)object.

Slides at https://www.lx.oliva.nom.br/slides/adacxxcept.en.pdf


The presentation will contrast Ada's and C++'s exception models, go
through the preexisting implementation and its constraints, how we've
extended exception declarations, relaxed handler constraints, exposed
C++ RTTI and used it in the runtime and the library to catch C++ derived
objects by Ada exceptions associated with the C++ base class, and to
gain access to the caught C++ sub-objects.

Free Software activist and developer. Recognized by the Free Software Foundation with the Award for Advancement of Free Software. GNU Project speaker and advisor. FSF Latin America founding board member, FSF voting member. Co-maintainer of GNU Linux-libre, IRPF-Livre, GNU Compiler Collection, GNU binutils and GNU libc. Independent consultant with AdaCore.

This speaker also appears in: