Denis Zaitsev <[EMAIL PROTECTED]> writes:

| This program:
| 
| void x(char *s)
| {
|     *s= 'x';
| }
| 
| main()
| {
|     x("y");
| }
| 
| is compiled plainly but cathes SIGSEGV in the 
| 
|         *s= 'x' 
| 
| line.  And it's because the string "y" is put in the .text section.
| And the fact that the x()'s parm is explicitly declared as <char*>,
| not <const char*> does nothing in this case.  Should it be considered
| as a bug?

In the program? Yes.

-- Gaby
-
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