www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 22927] New: importC: 'struct already exists' with forward

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

          Issue ID: 22927
           Summary: importC: 'struct already exists' with forward
                    reference and function with same name
           Product: D
           Version: D2
          Hardware: All
                OS: All
            Status: NEW
          Keywords: ImportC
          Severity: normal
          Priority: P1
         Component: dmd
          Assignee: nobody puremagic.com
          Reporter: duser neet.fi
                CC: duser neet.fi

struct block *tmp;
struct block {};
void block(void);
void block(void){}

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

--
Mar 25 2022