Subject: Re: snprintf() problem or I am stupid C programmer
To: maximum entropy <entropy@tappedin.com>
From: Andrew Brown <atatat@atatdot.net>
List: current-users
Date: 07/18/2001 09:06:55
>>> gcc will allocate strings in text segment, which means they're read-only.
>>
>>Doesn't that mean that the compiler should at least issue
>>a diagnostic if you implicitly cast away the const-ness
>>by saying char* xyz = "foo";?
>
>The flag -Wwrite-strings will enable this warning.

no, that flag puts the string in the data segment so that it's
writable.  perhaps you are thinking of -Wwrite-strings?

-- 
|-----< "CODE WARRIOR" >-----|
codewarrior@daemon.org             * "ah!  i see you have the internet
twofsonet@graffiti.com (Andrew Brown)                that goes *ping*!"
andrew@crossbar.com       * "information is power -- share the wealth."