Subject: Re: snprintf() problem or I am stupid C programmer
To: maximum entropy <>
From: Andrew Brown <>
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" >-----|             * "ah!  i see you have the internet (Andrew Brown)                that goes *ping*!"       * "information is power -- share the wealth."