The following C program will fail to link with a duplicate symbol error. ``` const char *s; // tentative definition const char *s = “hello”; // definition int puts(const char*); int main(void){ puts(s); return 0 } ``` duplicate symbol '_s' in: dup.o ld: 1 duplicate symbol for architecture x86_64 clang: error: linker command failed with exit code 1 (use -v to see invocation) Error: linker exited with status 1
@WalterBright created dlang/dmd pull request #14010 "fix Issue 23025 - ImportC: duplicate symbol for tentative definition …" fixing this issue: - fix Issue 23025 - ImportC: duplicate symbol for tentative definition and definition of variable https://github.com/dlang/dmd/pull/14010
dlang/dmd pull request #14010 "fix Issue 23025 - ImportC: duplicate symbol for tentative definition …" was merged into master: - 4c053d5bf3c69db248ffede01c3c808e6c299235 by Walter Bright: fix Issue 23025 - ImportC: duplicate symbol for tentative definition and definition of variable https://github.com/dlang/dmd/pull/14010