https://issues.dlang.org/show_bug.cgi?id=24381
Issue ID: 24381
Summary: ImportC: .di generator emits both forward declarations
and definition
Product: D
Version: D2
Hardware: All
OS: All
Status: NEW
Keywords: ImportC
Severity: normal
Priority: P1
Component: dmd
Assignee: [email protected]
Reporter: [email protected]
C code:
struct foo;
struct foo {
int x;
};
struct bar {
int x;
};
struct bar;
emitted .di file:
extern(C)
{
// ...
struct foo;
struct foo
{
int x = void;
}
struct bar
{
int x = void;
}
struct bar;
// ...
}
Which leads to an error about conflicting structs.
--