GCC Newspaper
JUNE 15, 2026
Date
/
Architectures
Components
Topics
News & Policy
Other
fold-const.cc

fold-const.cc: Remove strict_overflow_p flag from tree_single_nonnegative_p

The compiler removes the `strict_overflow_p` flag from `tree_single_nonnegative_p` and related Gimple functions.

The compiler removes the strict_overflow_p flag from tree_single_nonnegative_p as part of ongoing efforts to remove fold_overflow_warn() calls. This change also affects gimple-fold.cc, with similar modifications to gimple_assign_nonnegative_warnv_p and gimple_phi_nonnegative_warnv_p.

In Details

This commit continues the refactoring of fold-const.cc, specifically removing the strict_overflow_p flag from tree_single_nonnegative_p. This change ripples into gimple-fold.cc, affecting functions like gimple_assign_nonnegative_warnv_p and gimple_phi_nonnegative_warnv_p during Gimple SSA.

For Context

This commit focuses on simplifying the compiler's constant folding process by removing a flag related to strict overflow checking. The changes affect functions that determine whether expressions are non-negative, both in the main tree representation and in the Gimple intermediate representation.

Filed Under: optimizationconstant foldingrefactoringwarningsGimple