delorie.com/archives/browse.cgi | search |
From: | Hans-Bernhard Broeker <broeker AT physik DOT rwth-aachen DOT de> |
Newsgroups: | comp.os.msdos.djgpp |
Subject: | Re: MINGW vs DJGPP |
Date: | 19 Apr 2001 12:17:13 GMT |
Organization: | Aachen University of Technology (RWTH) |
Lines: | 22 |
Message-ID: | <9bml09$pg8$1@nets3.rz.RWTH-Aachen.DE> |
References: | <3ADD8755 DOT 71826091 AT ma DOT tum DOT de> <3ADDD586 DOT 15573 DOT EE76FB AT localhost> <3ADDB56A DOT D939F09 AT ma DOT tum DOT de> |
NNTP-Posting-Host: | acp3bf.physik.rwth-aachen.de |
X-Trace: | nets3.rz.RWTH-Aachen.DE 987682633 26120 137.226.32.75 (19 Apr 2001 12:17:13 GMT) |
X-Complaints-To: | abuse AT rwth-aachen DOT de |
NNTP-Posting-Date: | 19 Apr 2001 12:17:13 GMT |
Originator: | broeker@ |
To: | djgpp AT delorie DOT com |
DJ-Gateway: | from newsgroup comp.os.msdos.djgpp |
Reply-To: | djgpp AT delorie DOT com |
Waldemar Schultz <schultzma AT ma DOT tum DOT de> wrote: > more problems with MINGW port of gcc-2.95.2: > strw.c: > #include <stdio.h> > #include <stdlib.h> > #include <string.h> > int main(void) > { > char *bbb="ABCDefgh"; > strlwr(bbb); This causes undefined behaviour, which includes both "works as I though it would" and "crashes badly" as allowable alternatives (and lots of others, beyond those). bbb is a pointer into a string literal, but strlwr tries to modify the contents of the string it's given. -- Hans-Bernhard Broeker (broeker AT physik DOT rwth-aachen DOT de) Even if all the snow were burnt, ashes would remain.
webmaster | delorie software privacy |
Copyright © 2019 by DJ Delorie | Updated Jul 2019 |