This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
Re: Missing warning about uninitialized variable.
On 2007/11/29, Tom St Denis <tstdenis@ellipticsemi.com> wrote:
> 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 ...).
Q: What does it print?
A: Random data.
Q: How does it print?
A: Stochastically.
I said "it prints stochasticly random data". Is it wrong?
>
> :-)
>
> Tom
>
J.C.Pizarro