Re: Unexpected behaviour using unsigned char in comparison

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 9 January 2011 19:24, Falk S. wrote:
>
> Ok, that would be the "unexpected". I thought the unary operator~ needs no
> conversion (promotion) and therefore the return type is the same as the
> argument type.

Integral promotions are performed for operator ~ and int can represent
all the values of unsigned char, so the operand is promoted to int.


[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux