diff --git a/lib/compiler/aro_translate_c/ast.zig b/lib/compiler/aro_translate_c/ast.zig index b92db7862fb32227ab7a94c1d37bbd7feac16006..f4912391379e4841de6b7d5d4fe0a33df171c128 100644 --- a/lib/compiler/aro_translate_c/ast.zig +++ b/lib/compiler/aro_translate_c/ast.zig @@ -993,7 +993,7 @@ fn renderNode(c: *Context, node: Node) Allocator.Error!NodeIndex { .main_token = try c.addToken(.keyword_continue, "continue"), .data = .{ .lhs = 0, - .rhs = undefined, + .rhs = 0, }, }), .return_void => return c.addNode(.{ diff --git a/test/cases/translate_c/continue_from_while.c b/test/cases/translate_c/continue_from_while.c new file mode 100644 index 0000000000000000000000000000000000000000..2e2237f752f4198da86aa5e9105895edd83f7541 --- /dev/null +++ b/test/cases/translate_c/continue_from_while.c @@ -0,0 +1,14 @@ +void foo() { + for (;;) { + continue; + } +} + +// translate-c +// c_frontend=clang +// +// pub export fn foo() void { +// while (true) { +// continue; +// } +// }