From: Johan Myreen (jem@snakemail.hut.fi)
Date: 11/17/92


From: jem@snakemail.hut.fi (Johan Myreen)
Subject: Re: ANNOUNCE: Linux 0.98 pl5
Date: 17 Nov 1992 11:58:27 GMT

In article <JEM.92Nov16213559@lk-hp-6.hut.fi> jem@snakemail.hut.fi (Johan Myreen) writes:

>This breaks code modifying string literals, like for instance the
>mktemp library function when called like this: mktemp("/tmp/fooXXXXXX").
>This is not a bug in Linux or Gcc, but in *your* application, if you
>use mktemp like this, or do tricks like "bar"[2]++...

On second thought, these examples aren't very good, since the program
fragments are meaningless. But you get the idea: don't modify string
constants, not even through a pointer.

Gcc offers the -fwritable-strings option as a quick fix for these
non-standard programs.