Why don't C compilers warn about incompatible types with literal strings? – stackoverflow.com

The following program provokes systematic segmentation fault due to undefined behavior (trying to modify a string literal): int main() { char *s = "immutable"; s[0] = 'a'; return 0; } Still, ...

from Hot Questions - Stack Exchange OnStackOverflow
via Blogspot

Share this

0 Comment to "Why don't C compilers warn about incompatible types with literal strings? – stackoverflow.com"