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