This is the mail archive of the gcc-bugs@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]

[Bug regression/24956] Optimizer and uninitialised variables.



------- 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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]