Landing: 6ed5ed56da3d
Project / Subsystem
gcc / fold-const.cc
Date
2026-01-17
Author
Daniel Barboza
Commit
6ed5ed56da3d7450bd55334771930125c1131881
Source
github
Perf win
No
Breaking
No
All attributes
- project
- gcc
- subsystem
- fold-const.cc
- patch_id
- —
- commit_hash
- 6ed5ed56da3d7450bd55334771930125c1131881
- source_type
- github
- headline
- fold-const.cc: Overhaul tree_expr_nonnegative_(warn)_p
- tldr
- The compiler refactors `tree_expr_nonnegative_warnv_p` to remove `strict_overflow_p`, simplifying its API and eliminating associated code.
- author
- Daniel Barboza
- outcome
- committed
- performance_win
- false
- breaking_change
- false
- series_id
- —
- series_parts
- []
- tags
-
- • optimization
- • constant folding
- • refactoring
- • warnings
- discussion_id_link
- —
- bugzilla_pr
- —
- date
- 2026-01-17T00:00:00.000Z
The compiler removes the strict_overflow_p argument from tree_expr_nonnegative_warnv_p, which is then renamed to tree_expr_nonnegative_p. This change simplifies the function’s API and eliminates the need for local strict_overflow_p variables used with the RECURSE() macro. The original tree_expr_nonnegative_p function, which had a different API, is also removed, as its functionality is now covered by the modified tree_expr_nonnegative_p.