> From: Zack Weinberg <[EMAIL PROTECTED]>
>> James E Wilson <[EMAIL PROTECTED]> writes:
>>
>>>   unnecessary, and error prone (as evidenced by string literal memory
>>>   references not being properly identified as READONLY, although their
>>>   equivalent array representations are treated properly for example?)
>> 
>> If true, that sounds like a bug.  This is the only interesting issue
>> here from my point of view.  You might consider filing a bug report into
>> bugzilla for this.  Or contributing a patch.
> 
> This might just be the special case for string constants in C, that
> their type is "char*" despite their being allocated in read-only
> memory.  Paul, before filing a bug, find out whether -Wwrite-strings
> makes this alleged misbehavior go away; if it does, it's not a bug.

I just double checked, neither -Wwrite-strings nor -fconst-strings seems
to affect the READONLY attribute which should be associated with memory
references to static const strings; an earlier PR was already filed:
 
 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=21018

(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?)


Reply via email to