Bug 23658 – .di generation of variables should turn them into declarations

Status
RESOLVED
Resolution
FIXED
Severity
normal
Priority
P1
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2023-01-27T06:50:21Z
Last change time
2023-01-31T11:45:37Z
Keywords
pull
Assigned to
No Owner
Creator
Walter Bright
See also
https://issues.dlang.org/show_bug.cgi?id=4071

Comments

Comment #0 by bugzilla — 2023-01-27T06:50:21Z
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
Comment #2 by bugzilla — 2023-01-28T00:35:25Z
Comment #3 by dlang-bot — 2023-01-30T14:38:53Z
@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