[Bug c/89667] initializers for character string arrays (char *[]) appear to reside in protected storage
jakub at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Mon Mar 11 20:05:00 GMT 2019
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89667
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 #1 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
That is not a bug, that is how C works. You'd need gcc older than 4.0 and use
-fwritable-strings option if you'd need it to work. Or just use the named char
array variables initialized with string literals which is the portable way of
making strings writable.
More information about the Gcc-bugs
mailing list