Sender: nate AT cartsys DOT com Message-ID: <365F1F5C.4C2B9436@cartsys.com> Date: Fri, 27 Nov 1998 13:53:32 -0800 From: Nate Eldredge X-Mailer: Mozilla 4.05 [en] (X11; I; Linux 2.0.35 i486) MIME-Version: 1.0 To: djgpp AT delorie DOT com Subject: Re: odd behaviour. References: <73i719$bmd$1 AT clam DOT niwa DOT cri DOT nz> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Reply-To: djgpp AT delorie DOT com Richard Pett wrote: > > I have noticed the following odd behaviour in a program which I just wrote > using DJGPP and Allegro: > > I declared a bitmap, (BITMAP *buffer2;) but then never got around to using > this variable for anything. The program compiles OK but when I execute it, > it immediately terminates, apparantly due do allegro_exit() being called. > > Although I have fixed this problem by simply removing the declaration, I was > curious to know if anyone can tell me why this problem occured in the first > place - nothing bad happens if an integer is declared and then not defined. > Is this a BITMAP thing? An Allegro thing? A DJGPP thing? > > All though this is not important, I would like to know if anyone is able to > explain this very odd behaviour. Thanks :-) No, it shouldn't cause a problem. The fact that it did seems to imply that something else is wrong. In particular, memory overrun crashes are often very sensitive to memory layout, and removing or adding a single variable can change things considerably. So most likely, you have a bug. If you can't find it, you may want to post your source if it's short. -- Nate Eldredge nate AT cartsys DOT com