This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c/46090] 16 bit uint16_t puts non-zero in highest bits when shifting
- From: "kshakhna at gmail dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Wed, 20 Oct 2010 13:30:44 +0000
- Subject: [Bug c/46090] 16 bit uint16_t puts non-zero in highest bits when shifting
- Auto-submitted: auto-generated
- References: <bug-46090-4@http.gcc.gnu.org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46090
--- Comment #2 from Kamo Shakhnazaryan <kshakhna at gmail dot com> 2010-10-20 13:30:40 UTC ---
(In reply to comment #1)
> input * 0x0101 is really ((int)input) * 0x0101. So this behavior is correct.
input is declared as uint16_t.
Why input * 0x0101 is really ((int)input) * 0x0101 ?