]> git.draconx.ca Git - cdecl99.git/blobdiff - tests/cdecl99-c-invalid.sh
Don't allow restrict-qualified pointers to functions.
[cdecl99.git] / tests / cdecl99-c-invalid.sh
index 5ffb3b39a61a0b298314be7e32f23d57d0c0acc6..4370e58e6d3e81883e0db891d95883d7f5f28a15 100755 (executable)
@@ -30,8 +30,12 @@ test_decl explain 'long long long x'
 test_decl declare 'x as long long long'
 test_decl explain 'inline int x'
 test_decl declare 'x as inline int'
+# C99ยง6.7.3#2: Types other than opinter types derived from object or incomplete
+# types shall not be restrict-qualified.
 test_decl explain 'restrict int x'
 test_decl declare 'x as restrict int'
+test_decl explain 'int (*restrict f)(void)'
+test_decl declare 'f as restrict pointer to function (void) returning int'
 test_decl explain 'static auto int x'
 test_decl declare 'x as static auto int'
 test_decl explain 'auto x'