diff options
Diffstat (limited to 'tests/conformance')
| -rw-r--r-- | tests/conformance/5-declarations/fn_prototype_unnamed_pointer_params.zc | 8 | ||||
| -rw-r--r-- | tests/conformance/known.txt | 1 |
2 files changed, 8 insertions, 1 deletions
diff --git a/tests/conformance/5-declarations/fn_prototype_unnamed_pointer_params.zc b/tests/conformance/5-declarations/fn_prototype_unnamed_pointer_params.zc new file mode 100644 index 0000000..7136bee --- /dev/null +++ b/tests/conformance/5-declarations/fn_prototype_unnamed_pointer_params.zc @@ -0,0 +1,8 @@ +// expect: 7/ +// spec 5.2.1: a prototype's parameters may be unnamed, pointers included +include rt; +void pn(int x) { rt.put_n(x); rt.put_c(10); } +int f(int, int*); +fn main() { int[1] a; a[0] = 5; pn(f(2, a)); return 0; } +int f(int k, int* p) { return k + p[0]; } +// zc0: skip diff --git a/tests/conformance/known.txt b/tests/conformance/known.txt index 7cb703e..2fbd331 100644 --- a/tests/conformance/known.txt +++ b/tests/conformance/known.txt @@ -2,7 +2,6 @@ # class a: self-hosted compiler bug; b: zc0 deviation (appendix a/b); c: spec issue to settle # appendix b.2.8 (a global named in an initializer is its address) is documented behavior per 5.3.2 and 3.14.2: no entry 4-statements/o3_outside_function_ordinary_block.zc zy c top-level o3 { } is rejected; spec 4.10.2 says it is an ordinary block -5-declarations/fn_prototype_unnamed_params_b13.zc zy c spec 5.2.1 says prototype parameter names are required, and a type name alone is read as an untyped parameter of that name (paramstart); b.2.13 is a spec choice, not fixed 9-appendix-b/b2_10_recovery_hides_errors.zc zy c appendix b.2.10 confirmed; by design per 8.2 9-appendix-b/b2_14_len_char_ptr_typecheck_off.zc zy c appendix b.2.14 confirmed, but spec 3.13.5 leaves it unspecified 9-appendix-b/b2_15_duplicate_case.zc zy c appendix b.2.15 confirmed; 4.7.2 says duplicates are allowed |
