[LLVMbugs] [Bug 24338] New: warn about undefined behaviour if division result is not representable
bugzilla-daemon at llvm.org
bugzilla-daemon at llvm.org
Sun Aug 2 19:54:23 PDT 2015
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: unassignedclangbugs at nondot.org
Reporter: davide at freebsd.org
CC: llvmbugs at cs.uiuc.edu
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.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20150803/d24d187c/attachment.html>
More information about the llvm-bugs
mailing list