> From: Paul Schlie <[EMAIL PROTECTED]> > ... > (with respect to: -Wwrite-strings, I would have thought that the option, > although presently depreciated and disabled by default, would only have > enabled writes to string literal references be specified at the language > front-end level, but not affect the READONLY attribute associated with > them at the tree level, as regardless of the option enabling such writes > to be accepted, the objects are still a static literal constants, and may > simply not be physically writeable regardless of -Wwrite-strings?)
Sorry, apparently -fwritable-strings was depreciated, not -Wwrite-strings; however regardless, since there's no such thing as a string type in C/C++, strings are arrays of char, so it would seem most consistent to treat them as such by default. Which means by default, you can't write to a string literal/static-const, although may specify their static const literal value: http://gcc.gnu.org/bugzilla/show_bug.cgi?id=21018