[Bug regression/24956] Optimizer and uninitialised variables.
pcarlini at suse dot de
gcc-bugzilla@gcc.gnu.org
Sun Nov 20 13:37:00 GMT 2005
------- Comment #2 from pcarlini at suse dot de 2005-11-20 13:37 -------
(In reply to comment #1)
> There is no "correct" output when you use a variable uninitialized. It's
> undefined behavior. Printing any number, or crashing, would be completely
> valid behaviors as far as gcc is concerned.
Falk, of course you are right. However, when I saw the PR coming, I wondered
whether the point was also that it would be nice having the warning emitted
also at low optimization levels. Other compilers can do that, AFAIK. Maybe
we already have something open about that, tough, as enhancement request.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=24956
More information about the Gcc-bugs
mailing list