Message-ID: <3ADEBB93.A09C6B62@ma.tum.de> Date: Thu, 19 Apr 2001 12:18:59 +0200 From: Waldemar Schultz X-Mailer: Mozilla 4.75 [de] (Win98; U) X-Accept-Language: de,en-US MIME-Version: 1.0 Newsgroups: comp.os.msdos.djgpp To: djgpp AT delorie DOT com Subject: Re: MINGW vs DJGPP References: Content-Type: text/plain; charset=iso-8859-1 X-MIME-Autoconverted: from 8bit to quoted-printable by sunrbg2.mathematik.tu-muenchen.de id MAA16140 Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from quoted-printable to 8bit by delorie.com id GAA32707 Reply-To: djgpp AT delorie DOT com 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