diff --git a/test/testcharvar.cpp b/test/testcharvar.cpp index 6fb3c2adc..9dc31d202 100644 --- a/test/testcharvar.cpp +++ b/test/testcharvar.cpp @@ -77,6 +77,14 @@ private: "}"); ASSERT_EQUALS("[test.cpp:5]: (warning) Signed 'char' type used as array index.\n", errout.str()); + check("int buf[256];\n" + "void foo()\n" + "{\n" + " signed char ch = 0;\n" + " buf[ch] = 0;\n" + "}"); + ASSERT_EQUALS("", errout.str()); + check("int buf[256];\n" "void foo(signed char ch)\n" "{\n"