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: unassignedclangb...@nondot.org Reporter: dav...@freebsd.org CC: llvmbugs@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.
_______________________________________________ LLVMbugs mailing list LLVMbugs@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvmbugs