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

fold-const.cc: Remove strict_overflow_p from tree_binary_nonnegative

The compiler removes the `strict_overflow_p` flag from `tree_binary_nonnegative` and updates `gimple-fold.cc` accordingly.

The compiler removes the strict_overflow_p flag from tree_binary_nonnegative_warnv_p, renaming it to tree_binary_nonnegative_p. A local variable with the same name is temporarily added for the RECURSE() macro. The change also necessitates updates to gimple-fold.cc.

In Details

This commit focuses on removing strict_overflow_p from tree_binary_nonnegative_warnv_p in fold-const.cc. Due to the RECURSE() macro, a local variable is introduced temporarily. Updates are reflected in gimple-fold.cc, particularly affecting gimple_assign_nonnegative_warnv_p during Gimple SSA.

For Context

This commit removes overflow flags from the function tree_binary_nonnegative_warnv_p used during constant folding, as part of a larger effort to simplify overflow checking. This change impacts both the main tree representation and the Gimple intermediate representation within the compiler.

Filed Under: optimizationconstant foldingrefactoringwarningsGimple