Bug 5577 – Incorrectly generated di file with extern (C) and alias
Status
RESOLVED
Resolution
WORKSFORME
Severity
normal
Priority
P2
Component
dmd
Product
D
Version
D1 (retired)
Platform
Other
OS
Mac OS X
Creation time
2011-02-14T11:52:15Z
Last change time
2018-10-19T08:16:38Z
Assigned to
No Owner
Creator
Jacob Carlborg
Comments
Comment #0 by doob — 2011-02-14T11:52:15Z
The following D file:
module main;
void main ()
{
alias extern (C) void function () f;
}
Compiled with "dmd -H main.d" produces this D interface file:
// D import file generated from 'main.d'
module main;
void main()
{
extern (C) alias void function() f;
}
When compiling the interface file I get the following errors:
main.di(5): basic type expected, not alias
main.di(5): no identifier for declarator int
main.di(5): semicolon expected to close declaration, not 'alias'
This is using dmd 1.066.
Comment #1 by pro.mathias.lang — 2018-10-19T02:43:26Z
In D2 this produces:
```
// D import file generated from 'main.d'
module main;
void main();
```
And works as expected. Since D1 is retired (and the last user don't use interface files AFAIK), I'm going to close this.
Comment #2 by doob — 2018-10-19T08:16:38Z
(In reply to Mathias LANG from comment #1)
> I'm going to close this.
That's fine, it don't even remember how/where I encountered this :)