Skip to content

Commit 4e63028

Browse files
committed
aro_translate_c: fix ast lowering of continue node
fixes ziglang#22601
1 parent ea3a020 commit 4e63028

File tree

2 files changed

+15
-1
lines changed

2 files changed

+15
-1
lines changed

lib/compiler/aro_translate_c/ast.zig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -993,7 +993,7 @@ fn renderNode(c: *Context, node: Node) Allocator.Error!NodeIndex {
993993
.main_token = try c.addToken(.keyword_continue, "continue"),
994994
.data = .{
995995
.lhs = 0,
996-
.rhs = undefined,
996+
.rhs = 0,
997997
},
998998
}),
999999
.return_void => return c.addNode(.{
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
void foo() {
2+
for (;;) {
3+
continue;
4+
}
5+
}
6+
7+
// translate-c
8+
// c_frontend=clang
9+
//
10+
// pub export fn foo() void {
11+
// while (true) {
12+
// continue;
13+
// }
14+
// }

0 commit comments

Comments
 (0)