GCC Newspaper
OCTOBER 6, 2026
Date
/
Architectures
Components
Topics
News & Policy
Other
ranger

ranger: make range_from_missing_constructor_part return void

Simplifies range analysis by making a function return void.

The function range_from_missing_constructor_part in the ranger analysis pass previously returned a boolean indicating success. Since pointers are no longer specially handled in range_from_readonly_*, this function now always returns true. The change makes it return void and updates its callers accordingly, simplifying the analysis logic.

In Details

Within the gimple-range-fold analysis pass, range_from_missing_constructor_part was used to determine if a range could be constructed from a partially initialized object. As the logic in range_from_readonly_load evolved to not require special handling for pointers, the return value of range_from_missing_constructor_part became redundant (always true). This commit refactors it to return void, simplifying its interface and the code that calls it.

For Context
ranger analysis
A compiler analysis pass that determines the possible range of values for variables or expressions. This information is used for optimizations.
GIMPLE
GCC's internal three-address code representation, used after parsing and before final machine code generation. It's a key intermediate language for optimizations.
Filed Under: optimizationanalysis