Joe Buck wrote:
Careful. As you suggest, let's restrict ourselves to two's complement
platforms. I would want the compiler to warn if the identity holds for an
ILP32 machine but not an LP64 machine, even if I'm running on an ILP32.
But if the two types are going to be the same size everywhere (because one
is the unsigned modifier of the other) then GCC should not complain.
Indeed, between Gaby's message to the audit trail and the one to gcc@, I
had your very same doubt, then noticed that, in the -Wconversion
documentation, the bits about signed -> unsigned are distinct from the
bits about conversion to smaller type: we could simply leave the latter
untouched.
Paolo.