From: bchapman_nojunk_ AT feist DOT com (BJC) Newsgroups: comp.os.msdos.djgpp Subject: Re: Array Addressing Bug in DJGPP 2.02 with GCC 2.81 ??? Message-ID: References: <767k28$e46$1 AT latinum DOT dresearch DOT de> X-Newsreader: MicroPlanet Gravity v2.10 Lines: 31 Date: Mon, 28 Dec 1998 13:33:12 -0600 NNTP-Posting-Host: 198.247.5.45 X-Trace: newsfeed.slurp.net 914873386 198.247.5.45 (Mon, 28 Dec 1998 13:29:46 CDT) NNTP-Posting-Date: Mon, 28 Dec 1998 13:29:46 CDT To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Reply-To: djgpp AT delorie DOT com In article <767k28$e46$1 AT latinum DOT dresearch DOT de>, beck AT dresearch DOT de says... > No, sorryly this is a bug in you :-) heh, it figures ;-) > >i compiled this program with DJGPP 2.01 and PGCC 1.01 and all was > well...infact it left 2 > >bytes space between str2 and str1. > > It's difficult to say why. Maybe the optimizers in this compilers think, > that the strings should be allocated > 8 bytes aligned... hmm... > So the problem is your for loop. Note, that in C the typical construct for > traversing n elements is > for (i = 0; i < n; ++i) JonnyCarsonMode(tm) ON "oh, i did not know that." JonnyCarsonMode(tm) OFF heehee, well like i said i'm still new to programming. Thanks for the replys!! -- brian james chapman email: bchapman(at)feist(dot)com