www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 2637] New: Segfault using + inside char [] function parameter

reply d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=2637

           Summary: Segfault  using + inside char [] function parameter
           Product: D
           Version: 1.039
          Platform: PC
        OS/Version: Windows
            Status: NEW
          Keywords: ice-on-invalid-code
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: bugzilla digitalmars.com
        ReportedBy: clugdbug yahoo.com.au


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") );
}


-- 
Feb 01 2009
parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=2637


clugdbug yahoo.com.au changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |DUPLICATE




------- Comment #1 from clugdbug yahoo.com.au  2009-02-03 08:04 -------


*** This bug has been marked as a duplicate of 2199 ***


-- 
Feb 03 2009