Currently, generating the .di file for:
int a = 5;
int b;
extern int c;
void foo() { }
void bar();
extern void abc();
results in:
// D import file generated from 'test4.d'
int a = 5;
int b;
extern int c;
void foo();
void bar();
extern void abc();
Note that foo() was turned from a declaration into a definition, but a and b were not. They should be. This should make .di header generation much better for DLLs.
Comment #1 by dlang-bot — 2023-01-27T07:05:37Z
@WalterBright created dlang/dmd pull request #14851 "fix Issue 23658 - .di generation of variables should turn them into d…" fixing this issue:
- fix Issue 23658 - .di generation of variables should turn them into declarations
https://github.com/dlang/dmd/pull/14851
@RazvanN7 created dlang/dmd pull request #14854 "Fix Issue 23658 - replace uses of sprintf with snprintf in the compiler" fixing this issue:
- Fix Issue 23658 - replace uses of sprintf with snprintf in the compiler
https://github.com/dlang/dmd/pull/14854
Comment #4 by dlang-bot — 2023-01-31T11:45:37Z
dlang/dmd pull request #14851 "fix Issue 23658 - .di generation of variables should turn them into d…" was merged into master:
- 0a5bf79e757e08e07986b3d309039156a793c854 by Walter Bright:
fix Issue 23658 - .di generation of variables should turn them into declarations
https://github.com/dlang/dmd/pull/14851