diff options
| author | 2022-08-24 06:46:23 +0200 | |
|---|---|---|
| committer | 2022-08-24 06:46:23 +0200 | |
| commit | e5ed3b20351a2715fe88d9a5dbcc8e6757fe96aa (patch) | |
| tree | 7333f357bc38ed389e8845d59196594377dc46d6 /examples | |
| parent | 039ab20bbf6b68c423f420be2481b447d85c606b (diff) | |
llvm defer and more
Diffstat (limited to 'examples')
| -rw-r--r-- | examples/defer.cff | 2 | ||||
| -rw-r--r-- | examples/hello-world.cff | 3 |
2 files changed, 2 insertions, 3 deletions
diff --git a/examples/defer.cff b/examples/defer.cff index 7833717..f6ddabd 100644 --- a/examples/defer.cff +++ b/examples/defer.cff @@ -2,7 +2,7 @@ import "libc.hff"; extern fn main() void { let p = malloc(1); - defer free(p); + defer (do printf("freeing"); free(p);); if p == #null { if #f { return; diff --git a/examples/hello-world.cff b/examples/hello-world.cff index 998b5c2..8b81c17 100644 --- a/examples/hello-world.cff +++ b/examples/hello-world.cff @@ -1,7 +1,6 @@ import "libc.hff"; extern fn main(argc int, argv **u8) int { - argc += 1; - printf("hello %d %s\n", argc, *((argv + 2) - 1)); + printf("hello world\n"); } |