On Jan 15, 2005, at 1:22 PM, Denis Zaitsev wrote:

This program:

void x(char *s)
{
    *s= 'x';
}

main()
{
    x("y");
}

is compiled plainly but cathes SIGSEGV in the

        *s= 'x'

line.

That's what's supposed to happen. Storing into a string constant is invalid C.

-
To unsubscribe from this list: send the line "unsubscribe linux-gcc" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to