diff --git a/test/testpostfixoperator.cpp b/test/testpostfixoperator.cpp index 07614cd29..15ae8b2e6 100644 --- a/test/testpostfixoperator.cpp +++ b/test/testpostfixoperator.cpp @@ -54,6 +54,7 @@ private: TEST_CASE(testvolatile); TEST_CASE(testiterator); TEST_CASE(test2168); + TEST_CASE(pointerSimplest); TEST_CASE(pointer); // #2321 - postincrement of pointer is OK TEST_CASE(testtemplate); // #4686 TEST_CASE(testmember); @@ -314,6 +315,14 @@ private: ASSERT_EQUALS("", errout.str()); } + void pointerSimplest() { + check("void f(int* p){\n" + " p++;\n" + " std::cout << *p;\n" + "}"); + ASSERT_EQUALS("", errout.str()); + } + void pointer() { check("static struct class * ab;\n" "int * p;\n"