From: Hans-Bernhard Broeker Newsgroups: comp.os.msdos.djgpp Subject: Re: Help... classes and optimization problem Date: 28 May 2001 17:27:09 GMT Organization: Aachen University of Technology (RWTH) Lines: 14 Message-ID: <9eu1pd$b12$1@nets3.rz.RWTH-Aachen.DE> References: NNTP-Posting-Host: acp3bf.physik.rwth-aachen.de X-Trace: nets3.rz.RWTH-Aachen.DE 991070829 11298 137.226.32.75 (28 May 2001 17:27:09 GMT) X-Complaints-To: abuse AT rwth-aachen DOT de NNTP-Posting-Date: 28 May 2001 17:27:09 GMT Originator: broeker@ To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Reply-To: djgpp AT delorie DOT com Vermin wrote: [...] > But why did it all work well when I didn't use the optimization switch? Any > clue? The program was causing what the language definitions call "undefined behaviour". Which means that absolutely *anything* can happen, up to and including that you get exactly what you expected, but only if it's Tuesdays, the moon doesn't shine and you compiled without optimization. -- Hans-Bernhard Broeker (broeker AT physik DOT rwth-aachen DOT de) Even if all the snow were burnt, ashes would remain.