result type of an operation betweem signed and unsigned, c++
Dima Sorkin
dima.sorkin@gmail.com
Fri Apr 27 14:54:00 GMT 2007
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.
More information about the Gcc-help
mailing list