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

Ada accessibility function `Effective_Extra_Accessibility` removed

The redundant `Effective_Extra_Accessibility` function has been removed from the Ada front end, as `Extra_Accessibility` now handles object renamings automatic…

The Effective_Extra_Accessibility function has been removed from the Ada front end of GCC. This function was redundant because the computation of accessibility levels was not consistently looking through object renamings when extra accessibility objects were used. The Extra_Accessibility function has been updated to automatically handle object renamings, thus eliminating the need for a separate ‘effective’ function and simplifying the accessibility logic.

In Details

This commit refactors the accessibility check logic within the GCC Ada front end by removing the Effective_Extra_Accessibility function, primarily referenced in accessibility.ads and accessibility.adb. The core motivation is that the Extra_Accessibility function (renamed to Extra_Accessibility_Of_Object in einfo.ads and subsequently restored to Extra_Accessibility with added guards in accessibility.adb) now inherently accounts for object renamings. This change centralizes the logic for resolving accessibility through renamings within Extra_Accessibility, eliminating the need…

For Context

In programming languages like Ada, 'accessibility' governs how different parts of a program can safely access data, especially when dealing with pointers or values that might have different lifetimes. This update to the GCC Ada compiler simplifies how it performs these accessibility checks. Previously, there was a function called Effective_Extra_Accessibility that was complex because it didn't consistently handle situations where objects were renamed or aliased. This commit removes that function because the primary Extra_Accessibility function has been improved to automatically account for these renamings. By consolidating this logic, the compiler's codebase becomes cleaner, easier to understand, and less prone to errors related to how it determines safe data access.

Filed Under: adarefactoringcode-cleanupaccessibility