From ed6418902c6a9fe444b3c3b242bc7eb3f6c9471e Mon Sep 17 00:00:00 2001 From: Bruce Hill Date: Fri, 28 Mar 2025 15:51:15 -0400 Subject: Don't force inline C code to use ({...}) --- src/parse.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/parse.c') diff --git a/src/parse.c b/src/parse.c index de52f765..ff46fd03 100644 --- a/src/parse.c +++ b/src/parse.c @@ -2401,6 +2401,8 @@ PARSER(parse_inline_c) { parser_err(ctx, start, start+1, "I couldn't find the closing '}' for this inline C code"); CORD c_code = GC_strndup(c_code_start, (size_t)((pos-1) - c_code_start)); + if (type) + c_code = CORD_all("({ ", c_code, "; })"); return NewAST(ctx->file, start, pos, InlineCCode, .code=c_code, .type_ast=type); } -- cgit v1.2.3