Re: Missing warning about uninitialized variable.

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

 



J.C. Pizarro wrote:
There is some strange in the generated program.

For large projects with uninitialized variables, the behaviour
could be stochasticly flawed as a russian roulette.

Can I just end this with "undefined behaviour is not defined?"

If you want to know what is actually going on, fire up gdb, and single-step asm operations. Most likely "3" is some counter in the optimized case, (just happens to be) and not in the others. Who cares, it's undefined.

And stop using "stochastically random" too ... that's annoying. It's called "garbage" (not to be confused with MSFT software ...).

:-)

Tom

[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