[Issue 219] New: Compiler crash using string literal in non-extern(D) function call

d-bugmail at puremagic.com d-bugmail at puremagic.com
Thu Jun 22 15:44:50 PDT 2006


http://d.puremagic.com/issues/show_bug.cgi?id=219

           Summary: Compiler crash using string literal in non-extern(D)
                    function call
           Product: D
           Version: 0.161
          Platform: PC
        OS/Version: Windows
            Status: NEW
          Keywords: ice-on-valid-code
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: bugzilla at digitalmars.com
        ReportedBy: chris at dprogramming.com


// Compiler references memory at address 0x00000000
import std.c.windows.windows;
int main() 
{
   HWND hwnd; // ...
   SendMessageA(hwnd, EM_REPLACESEL, TRUE, cast(LPARAM)"foo".ptr);
   return 0; 
}

// Here is a workaround:
import std.c.windows.windows;
int main() 
{
   HWND hwnd; // ...
   char* temp = "foo";
   SendMessageA(hwnd, EM_REPLACESEL, TRUE, cast(LPARAM)temp);
   return 0; 
}


-- 




More information about the Digitalmars-d-bugs mailing list