Skip to content

Compiler errors in std pt. 2 #21094

@PauloCampana

Description

@PauloCampana

Similar to #20505, all of these are compiler errors

Commented lines have been fixed by
#21138
#21240
#21181
#21581
#21575
#21964
#22009
#24031

const std = @import("std");

test {
    // _ = &std.debug.dumpStackPointerAddr; // missing {s} format

    // windows
    // _ = &std.os.windows.sendmsg; // wrong type
    _ = &std.fs.File.tryLock; // returning void instead of bool
    _ = &std.debug.SelfInfo.Module.getDwarfInfoForAddress; // no such field debug_data

    // _ = &std.os.linux.BPF.btf.IntInfo; // invalid packed struct
    // _ = &std.os.linux.futex2_wake; // illegal [*]anyopaque
    // _ = &std.os.linux.futex2_wait; // missing intfromenum
    // _ = &std.os.linux.futex2_waitv;
    // _ = &std.os.linux.VFS_CAP_FLAGS_MASK; // ~ on comptime_int
    // _ = &std.os.linux.vfs_cap_data; // invalid extern stuct
    // _ = &std.os.linux.sendmmsg; // wrong type and field names
    // _ = &std.os.linux.sigismember; // bit shift with wrong type

    // haiku
    // _ = &std.c._kern_get_current_team; // got deleted?
    // _ = &std.c._kern_open_dir;
    // _ = &std.c._kern_read_dir;
    // _ = &std.c._kern_read_stat;
    // _ = &std.c._kern_rewind_dir;
    // _ = &std.c.vregs;

    // darwin
    // _ = &std.c.THREAD_STATE_NONE; // switch missing else
    // _ = &std.c.EXC.MASK; // invalid packed struct
    // _ = &std.c.sigaddset; // typo in segset_t
    // _ = &std.c.os_log_create; // extern fn with opaque
    // _ = &std.c.os_log_type_enabled;
    // _ = &std.c.os_signpost_enabled;
    // _ = &std.c.os_signpost_id_generate;
    // _ = &std.c.os_signpost_id_make_with_pointer;
    // _ = &std.c.os_signpost_interval_begin;
    // _ = &std.c.os_signpost_interval_end;
    // _ = &std.c.NOTE.PCTRLMASK; // ~ on comptime_int

    // _ = &std.posix.timestamp_t; // doesnt exist inside `system.` but `std.os.wasi.`

    // on systems where usize != u64
    _ = &std.Build.Fuzz.WebServer.coverageRun;
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugObserved behavior contradicts documented or intended behaviorcontributor friendlyThis issue is limited in scope and/or knowledge of Zig internals.standard libraryThis issue involves writing Zig code for the standard library.

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions