This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: different address spaces
- From: Paul Schlie <schlie at comcast dot net>
- To: Zack Weinberg <zack at codesourcery dot com>,James E Wilson <wilson at specifixinc dot com>
- Cc: Martin Koegler <mkoegler at auto dot tuwien dot ac dot at>,<gcc at gcc dot gnu dot org>
- Date: Sat, 23 Apr 2005 10:55:53 -0400
- Subject: Re: different address spaces
> From: Paul Schlie <schlie@comcast.net>
> ...
> (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