[Issue 22705] importC: forward reference to struct's typedef gives "struct already exists"
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Tue Jan 25 15:01:03 UTC 2022
https://issues.dlang.org/show_bug.cgi?id=22705
--- Comment #1 from duser at airmail.cc ---
slightly different example:
```
struct data1_s;
struct data2_s {
int x;
};
typedef struct data2_s data2_t;
struct data1_s {
data2_t* p;
};
```
test.c(3): Error: struct `test.data2_s` already exists at test.c(6). Perhaps in
another function with the same name?
the error disappears if the forward declaration of struct data1_s is removed
--
More information about the Digitalmars-d-bugs
mailing list