Wait, C string literals are not already const? On many platforms, they live in a read-only data section, which is write-protected memory.
Quote from gcc manual, explaining why you need to compile old code with -writable-strings option: "you cannot call mktemp with a string constant argument. The function mktemp always alters the string its argument points to.
Another consequence is that sscanf does not work on some systems when passed a string constant as its format control string or input. This is because sscanf incorrectly tries to write into the string constant. Likewise fscanf and scanf."
The standard C library uses const char * almost everywhere where a string is accepted that will not be modified.
So you might have a function that doesn't have proper "const" qualifications in its prototype like:
void my_log(char *message);
and then call-sites like: my_log("Hello, World!");
...and that needed to stay compiling.