[Bug c/46090] 16 bit uint16_t puts non-zero in highest bits when shifting

2010-10-20 Thread redi at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46090 --- Comment #3 from Jonathan Wakely 2010-10-20 13:34:31 UTC --- Because that's what the C standard says, under the rules for integer promotions

[Bug c/46090] 16 bit uint16_t puts non-zero in highest bits when shifting

2010-10-20 Thread kshakhna at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46090 --- Comment #2 from Kamo Shakhnazaryan 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)

[Bug c/46090] 16 bit uint16_t puts non-zero in highest bits when shifting

2010-10-19 Thread pinskia at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46090 Andrew Pinski changed: What|Removed |Added Status|UNCONFIRMED |RESOLVED Resolution|