www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 16575] New: [ICE] extern(C++) function with D specific types


          Issue ID: 16575
           Summary: [ICE] extern(C++) function with D specific types
           Product: D
           Version: D2
          Hardware: All
                OS: All
            Status: NEW
          Keywords: ice
          Severity: major
          Priority: P1
         Component: dmd
          Assignee: nobody puremagic.com
          Reporter: doob me.com

Compiling the following code will result in an ICE:

extern(C++) void foo(string a) {}

Error: Internal Compiler Error: unsupported type string

The same happens with other D specific types that don't exist in C++. Like
delegates and associative arrays. I'm pretty sure that the ICE comes from the
C++ mangler. The compiler should give a proper error, that the type is not
supported for C++ functions, before getting to the mangler.

Oct 02 2016