Bug 219 – Compiler crash using string literal in non-extern(D) function call

Status
RESOLVED
Resolution
WORKSFORME
Severity
normal
Priority
P2
Component
dmd
Product
D
Version
D1 (retired)
Platform
x86
OS
Windows
Creation time
2006-06-22T17:44:00Z
Last change time
2014-02-15T13:20:16Z
Keywords
ice-on-valid-code
Assigned to
bugzilla
Creator
chris

Comments

Comment #0 by chris — 2006-06-22T17:44:48Z
// 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; }
Comment #1 by bugzilla — 2007-10-02T14:47:53Z
Works with DMD 1.021 and 2.004