This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c/53013] Inconsistent Behaviour with Left Shift Operator.
- From: "redi at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Mon, 16 Apr 2012 22:09:26 +0000
- Subject: [Bug c/53013] Inconsistent Behaviour with Left Shift Operator.
- Auto-submitted: auto-generated
- References: <bug-53013-4@http.gcc.gnu.org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53013
--- Comment #3 from Jonathan Wakely <redi at gcc dot gnu.org> 2012-04-16 22:09:26 UTC ---
No, I would respectfully point out you're wrong, read the links in comment 1.
Undefined behaviour doesn't just mean "the standard omits to mention what
happens" it means *anything* can happen. That includes different behaviour
every time you run the program (think of accessing uninitialized data that
contains random junk values) or setting your monitor on fire or wiping your
hard drive. You should not have *any* expectations of undefined behaviour.