diff options
| author | Jacob Young <jacobly0@users.noreply.github.com> | 2022-10-05 01:21:11 -0400 |
|---|---|---|
| committer | Jacob Young <jacobly0@users.noreply.github.com> | 2022-10-25 05:11:28 -0400 |
| commit | c8d0e71de6c0e59b8f103526204b990fafe41f54 (patch) | |
| tree | f8d46324b2b3970e12838418e17a4570a5d9e7fd /src/codegen | |
| parent | ab024d3524f60c691221f6c838d6fe340c7c7cd7 (diff) | |
| download | zig-c8d0e71de6c0e59b8f103526204b990fafe41f54.tar.gz zig-c8d0e71de6c0e59b8f103526204b990fafe41f54.zip | |
c: fix mangling of error names
Closes #12751
Diffstat (limited to 'src/codegen')
| -rw-r--r-- | src/codegen/c.zig | 2 |
1 files changed, 1 insertions, 1 deletions
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 |
