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

Ada: Enforce dynamic accessibility check for conditional expressions

This commit enforces a missing dynamic accessibility check when assigning a conditional expression to a stand-alone object of an anonymous access type (saooaaa…

This commit addresses a missing dynamic accessibility check that occurred when assigning a conditional expression to a stand-alone object of an anonymous access type (saooaaat). The changes ensure that the required accessibility level check is performed, preventing potential security issues and ensuring that access to the object adheres to the intended visibility rules.

In Details

The fix involves modifications to accessibility.adb to ensure that Needs_Accessibility_Level_Temp_Or_Check returns True for the right-hand side of an assignment statement. The name of Is_Anonymous_Access_Actual was changed to Needs_Accessibility_Level_Temp_Or_Check in accessibility.ads to reflect the broader scope of the function. exp_ch4.adb is updated to call the renamed function.

For Context

In Ada, accessibility checks ensure that you can only access data that your code is allowed to see, preventing unauthorized access and potential security vulnerabilities. This commit fixes a case where the compiler was missing an accessibility check when assigning a conditional expression to a specific type of object (a stand-alone object of an anonymous access type), which could have allowed unintended access. The fix enforces the correct check, maintaining the integrity of the program's access controls.

Filed Under: adaaccessibilitysecurityconditional expression