aboutsummaryrefslogtreecommitdiff
path: root/docs/SPEC.md
diff options
context:
space:
mode:
Diffstat (limited to 'docs/SPEC.md')
-rw-r--r--docs/SPEC.md4
1 files changed, 2 insertions, 2 deletions
diff --git a/docs/SPEC.md b/docs/SPEC.md
index 529b5bf..cc94451 100644
--- a/docs/SPEC.md
+++ b/docs/SPEC.md
@@ -24,7 +24,7 @@ this is the reference for the zc language. it is written from `src/compiler/comp
1.2.1 `//` starts a comment that runs to the end of the line.
-1.2.2 `/* ... */` is a block comment. block comments do not nest. a block comment that is never closed runs to the end of the unit and is not an error.
+1.2.2 `/* ... */` is a block comment. block comments do not nest. a block comment that is never closed is error: unterminated comment.
1.2.3 comments are not tokens, but `docs on;` (5.14) and `hints` (4.12) read them: `//` lines directly above a declaration document it, and `//:` lines are implementation notes that document nothing. an inline block comment right before a numeric literal marks the literal as intentional for the magic-number hint. neither changes the generated code.
@@ -1114,7 +1114,7 @@ each item gives a minimal program, the expected behavior (per this spec) and the
8. not a bug: a global initializer that names another global uses the other global's address (5.3.2, 3.14.2): `int a = 5; int b = a + 1;` gives `b` the value `&a + 1`.
9. fixed (5.12.7): `include std;` inside a function body gave `return outside a function`; it is now error: include is top level only.
10. a syntax error hides errors in the statements skipped by recovery: `int a = ; int b = 3 +;` reports only the first error (8.2). by design, but easy to miss.
-11. an unterminated `/* ...` comment is accepted silently (1.2.2); an unterminated string literal is only reported as a later syntax error.
+11. fixed (1.2.2): an unterminated `/* ...` comment was accepted silently; it is error: unterminated comment. (an unterminated string literal is still only reported as a later syntax error.)
12. `x as int * y` parses `int*` as the type (3.2.3).
13. prototypes need parameter names: `int f(int);` => `expected a name, found ')'`.
14. `len(s)` on a `char*` returns word 0 of the string when `typecheck` is off.