Say I use this code to swap little with big endian, where *rp is a unsigned short *:
*rp = (*rp & 0xff00u) >> 8 | (*rp & 0x00ffu) << 8;
remark #810: conversion from "unsigned int" to "unsigned short" may lose significant bits
(with arrow pointing to the assignment)
At first I thought it saw the literal as an int, but then I replaced the expression by *rp & *rp and got the same error.
So, what gives? I didn't find any mention on the Web that bitwise ops upconverted to ints or unsigned ints.