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

Ada: Use aggregate in Save_Scan_State for better coverage.

The Ada compiler now uses an aggregate in `Save_Scan_State`, which enables full coverage checking.

The Ada compiler now uses an aggregate in Save_Scan_State instead of a series of individual assignments. This change enables full coverage checking, ensuring that all relevant fields are properly initialized.

In Details

This change refactors the Save_Scan_State function in scans.adb to use an aggregate for initializing its internal state. Aggregates provide full coverage checking, ensuring that all fields are initialized, which helps prevent potential issues related to uninitialized data. The affected file is scans.adb.

For Context

In software development, it's important to ensure that data structures are properly initialized to avoid unexpected behavior. This commit improves the initialization of internal state within the Ada compiler's scanner by using an aggregate. An aggregate is a language construct that initializes all fields of a record at once, providing a guarantee that no fields are left uninitialized.

Filed Under: adarefactorcode quality