This is the mail archive of the gcc-help@gcc.gnu.org mailing list for the GCC project.
| Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
|---|---|---|
| Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |
| Other format: | [Raw text] | |
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 ?
Thank you,
Dima.
| Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
|---|---|---|
| Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |