delorie.com/archives/browse.cgi | search |
X-Authentication-Warning: | delorie.com: mail set sender to djgpp-bounces using -f |
From: | Hans-Bernhard Broeker <broeker AT physik DOT rwth-aachen DOT de> |
Newsgroups: | comp.os.msdos.djgpp |
Subject: | Re: strange error |
Date: | 23 Jul 2004 10:31:50 GMT |
Lines: | 20 |
Message-ID: | <2mc7omFl9vr1U1@uni-berlin.de> |
References: | <20040723015811 DOT 04194 DOT 00001706 AT mb-m15 DOT aol DOT com> <20040723023556 DOT 15872 DOT 00001561 AT mb-m21 DOT aol DOT com> |
X-Trace: | news.uni-berlin.de JK8Pai9YPH8Ha0tynXeQ6Qs8qdH+p4A1VEUd3W2iw2H2IdwQ3o3BF8Nzxy |
X-Orig-Path: | not-for-mail |
To: | djgpp AT delorie DOT com |
DJ-Gateway: | from newsgroup comp.os.msdos.djgpp |
Reply-To: | djgpp AT delorie DOT com |
Sterten <sterten AT aol DOT com> wrote: > >m55:r--;if(R[r]!=1)goto m55; > I think this is the problem. > r might become smaller 0. > I should have included a > if(r==0)goto m57; > I'm still puzzled why then the program runs with -g and without -O2 > and with small dummy changes. Essentially: because that bug causes what the wizards call "undefined behaviour". And that means literally _anything_ may happen. It may crash only on the 5th Tuesday after Halloween, or send a nasty hate mail to your boss on Valentine's day. Whatever you can imagine can happen, and then some. -- 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 |