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

Add consistency checks for aspects and pragmas

VAST now includes checks for consistency between aspects and pragmas in Ada.

This commit adds Check_Corresponding_Aspect to VAST (Very Abstract Syntax Tree) to perform checks for consistency between aspects and pragmas. This improves compile-time diagnostics by ensuring that aspects and pragmas used together are compatible and well-formed.

In Details

This commit enhances the validation process in vast.adb with the addition of Check_Corresponding_Aspect. This function implements new checks for ensuring consistency between aspects and pragmas, contributing to better diagnostic capabilities during compilation. The commit also adds documentation of the implemented checks.

For Context

In Ada, aspects and pragmas are mechanisms to provide additional information to the compiler. Aspects are a more modern way to add metadata to code, while pragmas are older, compiler-specific directives. The Very Abstract Syntax Tree (VAST) is an internal representation of the Ada code used by the compiler. This commit adds new checks to VAST to ensure that aspects and pragmas are used consistently, helping catch potential errors early in the compilation process.

Filed Under: adaaspectspragmasVASTconsistency