January 12, 2007 [Issue 831] New: Warning!! String literals are read-only one some platforms. | ||||
---|---|---|---|---|
| ||||
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@digitalmars.com ReportedBy: digitalmars-com@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. -- |
Copyright © 1999-2021 by the D Language Foundation