Mail Archives: djgpp/2001/04/19/06:19:11
Eli Zaretskii schrieb:
> This is a classic gotcha with GCC. The bug is in your program: you are
> trying to change a read-only string.
>
> GCC by default puts constant strings into read-only storage, so trying to
> modify it triggers a protection violation. This will happen on any
> platform; DJGPP avoids this problem because our .data and .text segments
> overlap (due to subtleties of exception handling in DPMI environment),
> and that prevents us from making the code segment write-protected. MinGW
> doesn't have this problem, so your bug is exposed.
Thanks a lot for explaining this. (though, should not have happend to
me(blush) :-)
--
Gruss Waldemar Schultz.
Technische Universität München, Zentrum Mathematik M1, D 80290 München
Tel: +49 (0)89 2892 8226 FAX: +49 (0)89 2892 8228
- Raw text -