]> git.draconx.ca Git - cdecl99.git/blobdiff - tests/decl-good.at
libcdecl: Fix spacing after pointer qualifiers (again).
[cdecl99.git] / tests / decl-good.at
index d22675c13f7e0382aa7941826fafa04fda23bd2c..002e4822beb5c82a2c2cb6373204e803b3114a89 100644 (file)
@@ -212,6 +212,17 @@ SIMPLE_DECLS_EXPLAIN(
 SIMPLE_DECLS_EXPLAIN(
   [[int x, y], [m4_n([declare x as int])declare y as int]])
 
+# Check output spacing around qualified pointers
+SIMPLE_DECLS_DECLARE(
+  [[[int (* const)[]]], [type const pointer to array of int]],
+  [[[int (* volatile const)()]],
+    [type volatile const pointer to function returning int]],
+  [[[int (int * restrict const)]],
+    [type function (restrict const pointer to int) returning int]],
+  [[[int * const x]], [declare x as const pointer to int]],
+  [[[int * volatile * restrict x]],
+    [declare x as restrict pointer to volatile pointer to int]])
+
 # Test the simplify command with multiple declarators.  This is the only
 # command in cdecl99 which will print a single C declaration with more than
 # one full declarator.