https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83347
Jakub Jelinek <jakub at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |RESOLVED CC| |jakub at gcc dot gnu.org Resolution|--- |INVALID --- Comment #3 from Jakub Jelinek <jakub at gcc dot gnu.org> --- Compatibility with big amounts of code in the wild. Bugs with actually writing to string literals are rare and easy to spot at runtime (string literals usually are in readonly sections and any stores to them segfault). The warning is on by default in C++, because it has different wording here, while in C nothing in the standard says it is wrong to use char *p = "test";