-
-
Notifications
You must be signed in to change notification settings - Fork 14.8k
Duplicate errors for overflowing division / remainder #69020
Copy link
Copy link
Closed
Labels
A-const-evalArea: Constant evaluation, covers all const contexts (static, const fn, ...)Area: Constant evaluation, covers all const contexts (static, const fn, ...)C-bugCategory: This is a bug.Category: This is a bug.D-verboseDiagnostics: Too much output caused by a single piece of incorrect code.Diagnostics: Too much output caused by a single piece of incorrect code.T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.Relevant to the compiler team, which will review and decide on the PR/issue.
Metadata
Metadata
Assignees
Labels
A-const-evalArea: Constant evaluation, covers all const contexts (static, const fn, ...)Area: Constant evaluation, covers all const contexts (static, const fn, ...)C-bugCategory: This is a bug.Category: This is a bug.D-verboseDiagnostics: Too much output caused by a single piece of incorrect code.Diagnostics: Too much output caused by a single piece of incorrect code.T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.Relevant to the compiler team, which will review and decide on the PR/issue.
Type
Fields
Give feedbackNo fields configured for issues without a type.
When there is an overflowing division or remainder operation that const_prop can detect, the error is duplicated in release mode only:
shows
This is because
!overflow_checkistruein release mode but divison and remainder still get overflow checks.(This test case already covers the problem, so a fix does not need a new test case, it just needs to adjust the existing test case to no longer expect two
ERRORper line.)Cc @oli-obk @wesleywiser