This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: RFC: Desupport -fwritable-strings


Andreas Jaeger <aj at suse dot de> writes:

> On Monday 21 April 2003 19:33, Zack Weinberg wrote:
>> [...]
>> Here's a draft of expanded text for gcc-3.4/changes.html:
>>
>>   <li>GCC no longer accepts the <code>-fwritable-strings</code>
>>       option.  This will break programs that depend on being able to
>>       write into string constants.  To fix them, often you can can
>>       simply replace a pointer to a string constant with a character
>>       array initialized by a string constant.  For example:
>> <pre>
>>     char <b>*</b>template = "/tmp/progXXXXXX";
>>     int fd = mkstemp(template);
>> </pre>
>>       becomes
>> <pre>
>>     char template<b>[]</b> = "/tmp/progXXXXXX";
>>     int fd = mkstemp(template);
>
> Please give an example in C (I don't care whether additionally or instead),

Huh? That is an example in C.

zw


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]