Landing: b9ea11257cd5
Project / Subsystem
gcc / gccrs
Date
2026-06-27
Author
Lucas Ly Ba
Commit
b9ea11257cd54f33df81776d418dd569542526c5
Source
github
Perf win
No
Breaking
No
All attributes
- project
- gcc
- subsystem
- gccrs
- patch_id
- —
- commit_hash
- b9ea11257cd54f33df81776d418dd569542526c5
- source_type
- github
- headline
- gccrs: Add lint for double arithmetic negation
- tldr
- gccrs: Warns about likely erroneous double negations like `- -x`.
- author
- Lucas Ly Ba
- outcome
- committed
- performance_win
- false
- breaking_change
- false
- series_id
- —
- series_parts
- []
- tags
-
- • gccrs
- • rust
- • lint
- • warnings
- discussion_id_link
- —
- bugzilla_pr
- —
- date
- 2026-06-27T00:00:00.000Z
A new lint has been added to gccrs to detect and warn about double arithmetic negations, such as - -x. This construct is likely a mistake as Rust does not have a -- operator. The lint is implemented within the UnusedChecker in rust-unused-checker.cc.