Subject: Re: snprintf() problem or I am stupid C programmer
To: None <>
From: maximum entropy <>
List: current-users
Date: 07/18/2001 03:29:16
>Date: Wed, 18 Jul 2001 09:15:53 +0200
>From: Ingolf Steinbach <>
>On Tue, Jul 17, 2001 at 09:29:57PM +0200, Manuel Bouyer wrote:
>> 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.

entropy -- it's not just a good idea, it's the second law.