1 parent 1de35fb commit 8a00644Copy full SHA for 8a00644
1 file changed
test/testother.cpp
@@ -911,6 +911,12 @@ class TestOther : public TestFixture {
911
"}\n",
912
dinit(CheckOptions, $.cpp = false, $.settings = &settings));
913
ASSERT_EQUALS("", errout_str());
914
+
915
+ check("unsigned int f(unsigned int t) {\n"
916
+ " return t / (unsigned int)65536;\n"
917
+ "}\n",
918
+ dinit(CheckOptions, $.cpp = false, $.settings = &settings));
919
+ ASSERT_EQUALS("[test.c:2:14]: (error) Division by zero. [zerodiv]\n", errout_str());
920
}
921
922
void nanInArithmeticExpression() {
0 commit comments