Is this statement in http://dlang.org/dmd-windows.html still true?

Pierre Rouleau prouleau001 at gmail.com
Mon Jun 25 17:56:47 PDT 2012


Hi all,

inside http://dlang.org/dmd-windows.html#environment down in the section 
titled Differences between Windows and Linux versions, the statement is:

"String literals are read-only under Linux. Attempting to write to them 
will cause a segment violation."

This looks like an old and obsolete statement related to early 
implementations.  Isn't the compiler preventing writing to write to 
string literals?

Or is this statement there to want you not take the address of a string 
literal and attempt to write it via a pointer?

In both case, I think the statement should be modified (removed or 
clarified).  Am I reading this correctly?

Thanks

--

Pierre Rouleau


More information about the Digitalmars-d mailing list