isocpp / isocpp/CppCoreGuidelines
ES.104: Don't underflow is actually ES.103 Don't overflow in the sense of the language
Open
@PeterSommerlad is already working on this.
Since Nov 27, 2017.
- Dominant language
- CSS
- Stars
- 45.3k
- Forks
- 5.6k
- PR merge metrics
- No merged PRs in 30d
Description
ES.104: Don't underflow
Reason
Decrementing a value beyond a minimum value can lead to memory corruption and undefined behavior
According to the language rules, what is described here is actually "overflow".
"underflow" has another distinct meaning.
Suggestion by ISO SC22 WG23 and WG21 SG12:
- Merge the example of ES.104 into ES.103
- Drop rule ES.104
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.