Date: Tue, 23 Jun 1998 13:01:38 +0200 From: Hans-Bernhard Broeker Message-Id: <199806231101.NAA05619@acp3bf.physik.rwth-aachen.de> To: max AT alcyone DOT com (Erik Max Francis) Subject: Re: Program Crashes!!! Please help! Memory errors!!! Cc: djgpp AT delorie DOT com Newsgroups: comp.os.msdos.djgpp Organization: RWTH Aachen, III. physikalisches Institut B Precedence: bulk In article <358F35FE DOT 7E80050C AT alcyone DOT com> you wrote: [...] > > - Always compile programs with at least the flags '-Wall' and '-O'; > > the > > compiler can catch lots of mistakes if you let it. > The optimization flag -O will catch more mistakes? Sort of. '-Wall' alone won't catch all problems, since the compiler in non-optimizing mode won't even look at the source closely enough to notice them. To cite the gcc docs: `-Wuninitialized' An automatic variable is used without first being initialized. These warnings are possible only in optimizing compilation, because they require data flow information that is computed only when optimizing. If you don't specify `-O', you simply won't get these warnings. So yes, for ultra-picky gcc operation, you'll need '-Wall -O'. -- Hans-Bernhard Broeker (broeker AT physik DOT rwth-aachen DOT de) Even if all the snow were burnt, ashes would remain.