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

Simplify Suppressed Warning Checks in Ada Compiler

Introduces Warning_Is_Suppressed to simplify checks for suppressed warnings in the Ada compiler.

This commit simplifies how the Ada compiler checks for suppressed warnings by introducing a new subprogram, Warning_Is_Suppressed. This function provides a more straightforward way to determine if a warning has been suppressed, without needing to know the specific reason for the suppression. This change improves code readability and maintainability in the error handling component of the Ada front-end.

In Details

errout in GNAT tracks warnings and errors. This commit adds Warning_Is_Suppressed to erroutc.adb, allowing simpler checks for suppressed warnings. This simplifies calls within Finalize in errout.adb. A toolchain developer outside the Ada front-end might view this as a minor internal refactoring.

For Context

This commit focuses on simplifying the code within the Ada compiler that deals with warnings. When a programmer tells the compiler to ignore a specific warning, the compiler needs to keep track of this. This change introduces a new, simpler way to check if a warning has been ignored, making the compiler's code easier to understand and maintain.

Filed Under: adawarningsrefactoringcode simplification