Dima Sorkin writes: > On 12/25/05, Tom Emerson wrote: > > > for(unsigned i;i<10;++i){ > > > do something with "i"; > > > } > > Presumably because with -g the uninitialized variable check isn't > > performed. The behavior of that code is undefined: you really want to > > be initializing that loop variable. > > Is it a compiler's bug that it doesn't warn about it in debug mode ? No. As I said, the analysis done to find uninitialized variable use is not done when optimizations are turned off. That's just the way it is. -- Tom Emerson Basis Technology Corp. Software Architect http://www.basistech.com "You can't fake quality any more than you can fake a good meal." (W.S.B.)