Re: result type of an operation betweem signed and unsigned, c++

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

 



On 4/24/07, Andrew Haley wrote:
Dima Sorkin writes:
 >  The following surprised me a lot: I thought that a subtraction of
 > a 'signed' and 'unsigned' integers has the type "signed",
 > but it seems the opposite:
No, it's not.  See ISO/IEC 14882:1998(E) Section 5, Expressions,
Para. 9.
Hi.
I took a look there, now it is ok with me.
But suppose I want to review all places in my code where

1) There is an addition or a substraction between signed and unsigned int.
2) Assignment from one to other.

I know that GCC can warn me of 'signed' vs. 'unsigned'
comparison. Is there any simple way to find the others ?

Thanks, regards,
Dima.

[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