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