www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 1184] New: assignment failure

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

           Summary: assignment failure
           Product: D
           Version: 1.010
          Platform: Other
        OS/Version: Linux
            Status: NEW
          Severity: critical
          Priority: P2
         Component: DMD
        AssignedTo: bugzilla digitalmars.com
        ReportedBy: sheffmail mail.ru


The following code compiles successfully but when it runs it generates SIGSEGV:

int main(char[][] args)
{
 char[] a = "a";
 a[0] = 'b';
}

That bug only takes place in linux, in windows that code runs without fault.


-- 
Apr 24 2007
parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=1184


bugzilla digitalmars.com changed:

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





String literals are read-only. It is undefined behavior to attempt to write to
them.


-- 
Apr 24 2007