comiler warnings

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi.
  Look at the following peace of code:
for(unsigned i;i<10;++i){
    do something with "i";
}

gcc-3.3.6 under slackware linux:

When compiling in debug mode (-g), no warnings.
When compiling with optimization (-O2), it warns
that "i" will be used unitialized in the loop.

Why does compiler behave this way ?

Thank you.
Dima.

[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux