Bug 2637 – Segfault using + inside char [] function parameter

Status
RESOLVED
Resolution
DUPLICATE
Severity
normal
Priority
P2
Component
dmd
Product
D
Version
D1 (retired)
Platform
x86
OS
Windows
Creation time
2009-02-01T12:12:00Z
Last change time
2014-03-01T00:36:46Z
Keywords
ice-on-invalid-code
Assigned to
bugzilla
Creator
clugdbug

Comments

Comment #0 by clugdbug — 2009-02-01T12:12:14Z
Original bug reported by Zorran. This is a slightly simplified version. --- void foo(char []x) {} void main() { foo("x"+null); } ---- bug.d(5): Error: Array operations not implemented SEGFAULT Zorran's example: ---- import std.stdio; void main() { string ss="sample"; printf("%s", cast(char*)(ss+"\0") ); }
Comment #1 by clugdbug — 2009-02-03T08:04:33Z
*** This bug has been marked as a duplicate of 2199 ***