On 07/01/2012 06:42 PM, Pierre Rouleau wrote: > Would the following rewrite of the above statement maintain the original > intent while conveying a little bit more information? > > "It is never a good idea to write into a string literal.
"never a good idea" would be too permissive and welcoming. The documentation should simply say that writing into a string literal is undefined behavior (exactly like in other popular system languages like C and C++).
The current documentation gets into unnecessary detail of what may happen and why under different environments. Well, yes. :) It is undefined behavior.
Ali