Re: Integral conversions in C/C++

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

 



Christian Böhme wrote:
> Tom St Denis wrote:
> 
>> What type is the expression -(b * 2u)?
> 
> It _should_ be that of the destination type of the whole expression.
> and thus integral conversion of an rvalue applied.

The correct answer is unsigned int.

Please read C99 Section 6.3.1.1 Para 2, and Section 6.3.1.8.

Andrew.

[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