From c8d0e71de6c0e59b8f103526204b990fafe41f54 Mon Sep 17 00:00:00 2001 From: Jacob Young Date: Wed, 5 Oct 2022 01:21:11 -0400 Subject: c: fix mangling of error names Closes #12751 --- src/codegen/c.zig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/codegen') diff --git a/src/codegen/c.zig b/src/codegen/c.zig index 704e8a1391..4bc573ba6c 100644 --- a/src/codegen/c.zig +++ b/src/codegen/c.zig @@ -746,7 +746,7 @@ pub const DeclGen = struct { .@"error" => { const payload = val.castTag(.@"error").?; // error values will be #defined at the top of the file - return writer.print("zig_error_{s}", .{payload.data.name}); + return writer.print("zig_error_{s}", .{fmtIdent(payload.data.name)}); }, else => { // In this case we are rendering an error union which has a -- cgit v1.2.3