https://llvm.org/bugs/show_bug.cgi?id=24338
Bug ID: 24338
Summary: warn about undefined behaviour if division result is
not representable
Product: clang
Version: unspecified
Hardware: PC
OS: Windows NT
Status: NEW
Severity: normal
Priority: P
Component: -New Bugs
Assignee: [email protected]
Reporter: [email protected]
CC: [email protected]
Classification: Unclassified
If the quotient a/b is not representable, a/b and a%b have undefined behavior.
This is true at least in recent C and I guess it's true in C++ as well
(although I didn't check). It will be useful if clang would warn when this
happen.
Trivial example: INT_MIN % -1
--
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
LLVMbugs mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/llvmbugs