| ... | @@ -937,8 +937,7 @@ static AstNode *trans_compound_stmt(Context *c, AstNode *parent, CompoundStmt *s | ... | @@ -937,8 +937,7 @@ static AstNode *trans_compound_stmt(Context *c, AstNode *parent, CompoundStmt *s |
| 937 | static AstNode *trans_return_stmt(Context *c, AstNode *block, ReturnStmt *stmt) { | 937 | static AstNode *trans_return_stmt(Context *c, AstNode *block, ReturnStmt *stmt) { |
| 938 | Expr *value_expr = stmt->getRetValue(); | 938 | Expr *value_expr = stmt->getRetValue(); |
| 939 | if (value_expr == nullptr) { | 939 | if (value_expr == nullptr) { |
| 940 | emit_warning(c, stmt->getLocStart(), "TODO handle C return void"); | 940 | return trans_create_node(c, NodeTypeReturnExpr); |
| 941 | return nullptr; | | |
| 942 | } else { | 941 | } else { |
| 943 | AstNode *return_node = trans_create_node(c, NodeTypeReturnExpr); | 942 | AstNode *return_node = trans_create_node(c, NodeTypeReturnExpr); |
| 944 | return_node->data.return_expr.expr = trans_expr(c, true, block, value_expr, TransRValue); | 943 | return_node->data.return_expr.expr = trans_expr(c, true, block, value_expr, TransRValue); |