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

Implement Error Filtering and Deletion in Ada Compiler

Adds a new function, Filter_And_Delete_Errors, to allow targeted removal of error messages in the Ada compiler.

This commit introduces Filter_And_Delete_Errors in the Ada compiler, providing a mechanism to selectively remove error messages. The existing Purge_Messages function was renamed to Delete_Error_Msgs_In_Range. This enhancement allows more precise control over which error messages are removed during compilation, improving error reporting and potentially simplifying debugging.

In Details

The errout package in GNAT manages error reporting. This commit introduces Filter_And_Delete_Errors in erroutc.adb, offering more granular control over error message deletion. Purge_Messages is renamed to Delete_Error_Msgs_In_Range. Toolchain developers outside the Ada front-end might not immediately recognize the impact on error message management.

For Context

The Ada compiler produces error messages when it encounters problems in your code. This commit enhances the compiler's ability to manage these error messages by adding a function that can selectively filter and delete specific errors. This allows the compiler to be more precise in what it reports to the user, potentially making it easier to identify and fix the underlying issues in the code.

Filed Under: adaerror handlingfilteringdebugging