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

Simplify Limited Type test

The Ada compiler's test for limited types is simplified by removing a redundant condition.

The Ada compiler’s Is_Limited_Type function was simplified by removing a redundant check. The condition Is_Limited_Composite always implies Is_Limited_Type, making the original disjunction unnecessary. This simplification cleans up the code without altering its behavior.

In Details

The commit simplifies the test in Process_Full_View in sem_ch3.adb. The condition Is_Limited_Type always returns True for types where Is_Limited_Composite is True, therefore the removed disjunct had no effect.

For Context

In Ada, a *limited type* is a type for which assignment and equality are not automatically defined. This commit simplifies the internal logic the compiler uses to identify limited types. Specifically, it removes a redundant check within the Is_Limited_Type function. This change makes the compiler's code slightly cleaner and easier to understand.

Filed Under: adalimited typescode simplificationcleanup