www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 22080] New: ImportC: Error: cannot implicitly convert

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

          Issue ID: 22080
           Summary: ImportC: Error: cannot implicitly convert expression
                    of type 'extern(C) function' to 'function'
           Product: D
           Version: D2
          Hardware: All
                OS: All
            Status: NEW
          Severity: critical
          Priority: P1
         Component: dmd
          Assignee: nobody puremagic.com
          Reporter: ibuclaw gdcproject.org

Seems like CParser isn't marking all function pointer types as 'extern(C)'.

Reduced test:
---
int fun();

void test()
{
  int (*funp)() = &fun;
}

--
Jun 23