Skip to content

-Wdeprecated-non-prototype warning in musl's dlstart.c with zig cc main.c -target aarch64-linux-musl #13385

@alexrp

Description

@alexrp

Zig Version

0.10.0

Steps to Reproduce and Observed Behavior

$ cat main.c
#include <stdio.h>

int main()
{
    printf("Hello World\n");
}
$ zig cc main.c -target aarch64-linux-musl
In file included from /home/alexrp/sysroot/lib/zig/lib/libc/musl/crt/rcrt1.c:3:
/home/alexrp/sysroot/lib/zig/lib/libc/musl/crt/../ldso/dlstart.c:146:20: warning: a function declaration without a prototype is deprecated in all versions of C and is treated as a zero-parameter prototype in C2x, conflicting with a subsequent definition [-Wdeprecated-non-prototype]
        GETFUNCSYM(&dls2, __dls2, base+dyn[DT_PLTGOT]);
                          ^
/home/alexrp/sysroot/lib/zig/lib/libc/musl/crt/rcrt1.c:11:13: note: conflicting prototype is here
hidden void __dls2(unsigned char *base, size_t *sp)
            ^
1 warning generated.

Also happens for arm-linux-musleabihf.

This did not occur in 0.9.1.

Expected Behavior

No warning.

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.upstreamAn issue with a third party project that Zig uses.

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions