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

Removed an unused global variable from the Ada front end

A global variable previously used for a GNAT Pro variant has been removed from the Ada front end, cleaning up dead code.

A global variable named Latest_Ada_Only has been removed from the Ada front end of GCC. This variable was exclusively used by the “Community” variant of GNAT Pro, which is no longer in use. Removing this dead code simplifies the compiler’s internal structure and reduces maintenance overhead.

In Details

This commit refactors the GCC Ada front end by removing the Latest_Ada_Only global variable, primarily referenced in opt.ads, par-prag.adb, sem_prag.adb, switch-c.adb, and usage.adb. This variable was specific to the "Community" variant of GNAT Pro, which is now defunct. Its removal simplifies the code by eliminating a vestigial component and its associated conditional logic, streamlining the compiler's internal state management.

For Context

Compilers like GCC contain many internal variables that control how they process code. Over time, some features or product variants might be discontinued, leaving behind unused code and variables. This commit cleans up the Ada part of GCC by removing a global variable, Latest_Ada_Only, that was only relevant to a specific, now-defunct variant of GNAT Pro (an Ada development environment). Deleting this unused variable makes the compiler's code base smaller, easier to understand, and less prone to subtle bugs caused by irrelevant historical baggage.

Filed Under: adarefactoringcode-cleanup