// expect: 1 2 30 31 9 /1 2 4 30 31 /5 3 / // spec 4.14.1: the block form `defer { ... }`, with no semicolon after it: several statements and a local of its own, run at every exit of the scope include rt; void pn(int x) { rt.put_n(x); rt.put_c(32); } int f(int c) { defer { int k = 30; pn(k); pn(k + 1); } pn(1); pn(2); if (c) { pn(4); return 0; } return 9; } fn main() { pn(f(0)); rt.put_c(10); f(1); rt.put_c(10); { defer { pn(3); } pn(5); } rt.put_c(10); return 0; } // zc0: skip