[Issue 831] New: Warning!! String literals are read-only one some platforms.

d-bugmail at puremagic.com d-bugmail at puremagic.com
Thu Jan 11 17:55:00 PST 2007


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

           Summary: Warning!! String literals are read-only one some
                    platforms.
           Product: D
           Version: 1.00
          Platform: PC
        OS/Version: Windows
            Status: NEW
          Severity: enhancement
          Priority: P1
         Component: www.digitalmars.com
        AssignedTo: bugzilla at digitalmars.com
        ReportedBy: digitalmars-com at baysmith.com


The Strings section of the arrays page
(http://www.digitalmars.com/d/arrays.html) needs a big, bold WARNING that
string literals may be read-only on some platforms (for example Linux). A
simple example would also be helpful. Maybe something like the following.

char[] a = "abc";
a[1] = "-"; // Invalid. Will compile, but may crash.

Since this is a portability and a reliabilty issue, it should have high
priority.

The compiler page (http://www.digitalmars.com/d/dcompiler.html) appears to be
the only place this issue is noted.


-- 



More information about the Digitalmars-d-bugs mailing list