www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 12738] New: core.sys.posix.signal sigaction_t handler type


          Issue ID: 12738
           Summary: core.sys.posix.signal sigaction_t handler type
           Product: D
           Version: D2
          Hardware: x86
                OS: Linux
            Status: NEW
          Severity: regression
          Priority: P1
         Component: DMD
          Assignee: nobody puremagic.com
          Reporter: hsteoh quickfur.ath.cx

extern(C) void myHandler(int sig) {}

void main() {
        import core.sys.posix.signal;
        sigaction_t n;
        n.sa_handler = &myHandler;

Compiler output:
test.d(7): Error: cannot implicitly convert expression (& myHandler) of type
extern (C) void function(int sig) to extern (C) void function(int) nothrow

This used to work in 2.065.0.

May 12 2014