Michael Matz wrote:
First string literals are now always const char, ...
Hm... ;)
Actually the behavior with -Wwrite-strings that we had is what
gcc has too:
typeof("123") cc = "456";
cc[1] = 'x';
printf("%s\n", cc);
$ gcc -Wno-write-strings ...
4x6
$ gcc -Wwrite-strings ...
error: assignment of read-only location 'cc[1]'
(mingw gcc 3.4.2 and 6.3.0)
Also, now tcc doesn't warn with this one anymore:
const char cc[] = "456";
char *p = cc;
--- grischka
_______________________________________________
Tinycc-devel mailing list
[email protected]
https://lists.nongnu.org/mailman/listinfo/tinycc-devel