dmd
dmd copied to clipboard
ImportC: .di generator emits both forward declarations and definition
dave287091 reported this on 2024-02-09T19:34:15Z
Transferred from https://issues.dlang.org/show_bug.cgi?id=24381
Description
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.
marked down!