GCC Newspaper
JUNE 15, 2026
Date
/
Architectures
Components
Topics
News & Policy
Other
ada

Fixes exception message for attaching non-handler procedures

Improves the error message when attaching a non-interrupt-handler procedure in Ada.

This commit corrects the exception message raised when Attach_Handler is called on a procedure without the Interrupt_Handler aspect specified. The error message now accurately reflects the cause of the error, improving debugging and code maintainability.

In Details

The commit modifies libgnarl/s-interr.adb to provide a more relevant exception message in the Unprotected_Exchange_Handler. Previously, the message was misleading, pointing to an unrelated error. This change enhances the clarity of error reporting during interrupt handler attachment.

For Context

In Ada, interrupt handlers are special procedures designed to respond to specific hardware interrupts. This commit improves the error message displayed when a regular procedure (one not designed to be an interrupt handler) is incorrectly attached as an interrupt handler. The improved message will help developers quickly identify and fix such errors.

Filed Under: adaexceptionsinterrupts