diff options
| author | 2026-10-14 16:14:02 +0330 | |
|---|---|---|
| committer | 2026-10-14 16:14:02 +0330 | |
| commit | d93000c4b5ff7b3dda0e59a4d333b0463e745e04 (patch) | |
| tree | 0a244d9e379794e2240b2c876f1a029fa34a8d27 /tests/conformance | |
| parent | globals: a float or f32 global takes a float literal initializer (appendix b.... (diff) | |
include: written inside a function body is 'include is top level only' (appendix b.2.9)
Diffstat (limited to 'tests/conformance')
| -rw-r--r-- | tests/conformance/5-declarations/include_in_function_b9.zc | 2 | ||||
| -rw-r--r-- | tests/conformance/known.txt | 1 |
2 files changed, 1 insertions, 2 deletions
diff --git a/tests/conformance/5-declarations/include_in_function_b9.zc b/tests/conformance/5-declarations/include_in_function_b9.zc index cccaea5..64f170c 100644 --- a/tests/conformance/5-declarations/include_in_function_b9.zc +++ b/tests/conformance/5-declarations/include_in_function_b9.zc @@ -1,4 +1,4 @@ -// expect error: include +// expect error: include is top level only // spec 5.12.7 and appendix b.2.9: expected an error saying include is top level only include rt; void pn(int x) { rt.put_n(x); rt.put_c(10); } diff --git a/tests/conformance/known.txt b/tests/conformance/known.txt index 044b862..8415b18 100644 --- a/tests/conformance/known.txt +++ b/tests/conformance/known.txt @@ -4,7 +4,6 @@ 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/enum_member_names_earlier_b2.zc zy a appendix b.2.2 confirmed: enum members can't name earlier members 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 -5-declarations/include_in_function_b9.zc zy a appendix b.2.9 confirmed: include in a body gives "return outside a function" 9-appendix-b/b2_05_ternary_int_float.zc zy a appendix b.2.5 confirmed 9-appendix-b/b2_06_bool_normalises.zc zy a appendix b.2.6 confirmed 9-appendix-b/b2_10_recovery_hides_errors.zc zy c appendix b.2.10 confirmed; by design per 8.2 |
