diff --git a/shared/cplusplus/PrettyPrinter.cpp b/shared/cplusplus/PrettyPrinter.cpp
index 891a63020cd6de11c1cb964043e27539e064710c..d7570127e327e7b7eb9f5ecf623f64cac7a74b87 100644
--- a/shared/cplusplus/PrettyPrinter.cpp
+++ b/shared/cplusplus/PrettyPrinter.cpp
@@ -566,9 +566,8 @@ bool PrettyPrinter::visit(FunctionDeclaratorAST *ast)
     accept(ast->parameters);
     out << ')';
     for (SpecifierAST *it = ast->cv_qualifier_seq; it; it = it->next) {
+        out << ' ';
         accept(it);
-        if (it->next)
-            out << ' ';
     }
     if (ast->exception_specification) {
         out << ' ';
diff --git a/tests/manual/cplusplus/tests/t1.cpp b/tests/manual/cplusplus/tests/t1.cpp
index 8687efb48f440bf5bf2f53515f8f004b8928e136..186d9fbea7cf0277c8445fa9c06ac34304b37803 100644
--- a/tests/manual/cplusplus/tests/t1.cpp
+++ b/tests/manual/cplusplus/tests/t1.cpp
@@ -23,6 +23,8 @@ class Class {
 };
 
 class Derived: public Class {
+  operator bool() const volatile throw () { return 1; }
+  Derived &operator++() {}
 };
 
 class Derived2: public Class, public virtual Derived {};