Is it time to take the middle-end stringop/array warnings out of -Wall?
Project / Subsystem
gcc / gcc
Date
2026-05-20
Proposer
Jonathan Wakely <jwakely.gcc@gmail.com>
Source type
public_inbox
Consensus
Under Review
Sentiment
—/10
Technical tradeoffs
- • Moving the warnings to -Wextra might cause them to be ignored, leading to bitrot.
- • Removing the warnings entirely might eliminate the incentive to improve the compiler's optimization capabilities.
- • Keeping the warnings in -Wall can lead to user frustration due to false positives.
All attributes
- project
- gcc
- subsystem
- gcc
- patch_id
- —
- discussion_id
- CAH6eHdRfEVsGjbJ__kU5AR9BfVdLQZ_iGGDZa=yQnT4fgG2P6w@mail.gmail.com
- source_type
- public_inbox
- title
- Is it time to take the middle-end stringop/array warnings out of -Wall?
- headline
- Is it time to take the middle-end stringop/array warnings out of -Wall?
- tldr
- Jonathan Wakely argues for removing middle-end stringop/array warnings from -Wall due to high false positive rates and lack of actionable information.
- proposer
- Jonathan Wakely <jwakely.gcc@gmail.com>
- consensus
- Under Review
- outcome
- proposed
- sentiment_score
- —
- technical_tradeoffs
-
- • Moving the warnings to -Wextra might cause them to be ignored, leading to bitrot.
- • Removing the warnings entirely might eliminate the incentive to improve the compiler's optimization capabilities.
- • Keeping the warnings in -Wall can lead to user frustration due to false positives.
- series_id
- —
- series_role
- standalone
- series_parts
- []
- tags
-
- • warnings
- • -Wall
- • middle-end
- • stringop
- • array
- url
- https://inbox.sourceware.org/gcc/CAH6eHdRfEVsGjbJ__kU5AR9BfVdLQZ_iGGDZa=yQnT4fgG2P6w@mail.gmail.com
- bugzilla_url
- —
- date
- 2026-05-20T00:00:00.000Z
Is it time to take the middle-end stringop/array warnings out of -Wall?
Jonathan Wakely argues that the false positive rate for middle-end stringop/array warnings in GCC has been unacceptably high for years. He claims the warnings often lie, are not actionable, and make GCC look bad. He suggests that using these warnings as a proxy for finding missed optimization opportunities is a terrible policy.