www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 22705] New: importC: forward reference to struct's typedef

https://issues.dlang.org/show_bug.cgi?id=22705

          Issue ID: 22705
           Summary: importC: forward reference to struct's typedef gives
                    "struct already exists"
           Product: D
           Version: D2
          Hardware: All
                OS: All
            Status: NEW
          Severity: regression
          Priority: P1
         Component: dmd
          Assignee: nobody puremagic.com
          Reporter: duser airmail.cc

```
data_t *p;
struct data_s {
        int x;
};
typedef struct data_s data_t;
```

test.c(2): Error: struct `test.data_s` already exists at test.c(5). Perhaps in
another function with the same name?

this used to work before the fix for issue 22623

--
Jan 25 2022