diff --git a/src/translate_c.zig b/src/translate_c.zig index 395a314f7c..df8e285b59 100644 --- a/src/translate_c.zig +++ b/src/translate_c.zig @@ -1969,7 +1969,7 @@ fn transBuiltinFnExpr(c: *Context, scope: *Scope, expr: *const clang.Expr, used: const node = try transExpr(c, scope, expr, used); if (node.castTag(.identifier)) |ident| { const name = ident.data; - if (!isBuiltinDefined(name)) return fail(c, error.UnsupportedTranslation, expr.getBeginLoc(), "TODO implement function '{s}' in std.c.builtins", .{name}); + if (!isBuiltinDefined(name)) return fail(c, error.UnsupportedTranslation, expr.getBeginLoc(), "TODO implement function '{s}' in std.zig.c_builtins", .{name}); } return node; } @@ -5574,7 +5574,7 @@ fn parseCPrimaryExprInner(c: *Context, m: *MacroCtx, scope: *Scope) ParseError!N .Identifier => { const mangled_name = scope.getAlias(slice); if (mem.startsWith(u8, mangled_name, "__builtin_") and !isBuiltinDefined(mangled_name)) { - try m.fail(c, "TODO implement function '{s}' in std.c.builtins", .{mangled_name}); + try m.fail(c, "TODO implement function '{s}' in std.zig.c_builtins", .{mangled_name}); return error.ParseError; } const identifier = try Tag.identifier.create(c.arena, builtin_typedef_map.get(mangled_name) orelse mangled_name); diff --git a/test/run_translated_c.zig b/test/run_translated_c.zig index 4953896636..ef2fd187df 100644 --- a/test/run_translated_c.zig +++ b/test/run_translated_c.zig @@ -1243,7 +1243,7 @@ pub fn addCases(cases: *tests.RunTranslatedCContext) void { \\} , ""); - // See __builtin_alloca_with_align comment in std.c.builtins + // See __builtin_alloca_with_align comment in std.zig.c_builtins cases.add("use of unimplemented builtin in unused function does not prevent compilation", \\#include \\void unused() { diff --git a/test/translate_c.zig b/test/translate_c.zig index 1ceaf15e5c..b75d3b5cac 100644 --- a/test/translate_c.zig +++ b/test/translate_c.zig @@ -3461,11 +3461,11 @@ pub fn addCases(cases: *tests.TranslateCContext) void { \\pub const MAY_NEED_PROMOTION_OCT = @import("std").zig.c_translation.promoteIntLiteral(c_int, 0o20000000000, .octal); }); - // See __builtin_alloca_with_align comment in std.c.builtins + // See __builtin_alloca_with_align comment in std.zig.c_builtins cases.add("demote un-implemented builtins", \\#define FOO(X) __builtin_alloca_with_align((X), 8) , &[_][]const u8{ - \\pub const FOO = @compileError("TODO implement function '__builtin_alloca_with_align' in std.c.builtins"); + \\pub const FOO = @compileError("TODO implement function '__builtin_alloca_with_align' in std.zig.c_builtins"); }); cases.add("null sentinel arrays when initialized from string literal. Issue #8256",