Re: signed/unsigned comparison warning level

2010-09-27 Thread Manuel López-Ibáñez
On 27 September 2010 05:19, J Decker wrote: > > I don't know why standards left this open, other than there isn't a > single-instruction translation from code to CPU for the comparison; > > But if it's not fixed, this warning should definatly be issued at > default warning level.  This should be m

Re: signed/unsigned comparison warning level

2010-09-27 Thread David Brown
On 27/09/2010 07:51, J Decker wrote: The standards did not leave this open. They define precisely what is supposed to happen. Really? I'll have to drop this whole lobbying effort then. That makes me sad that they didn't define it to be comparing of the numbers where there are overlaps in si

Re: signed/unsigned comparison warning level

2010-09-27 Thread J Decker
ed comparison. > > unsigned int x; > int y; > if ((int)x < y) > > -Rick > > -Original message- > > From: J Decker > To: Ian Lance Taylor > Cc: gcc@gcc.gnu.org > Sent: Mon, Sep 27, 2010 05:51:56 GMT+00:00 > Subject: Re: signed/unsigned comparison warning leve

Re: signed/unsigned comparison warning level

2010-09-26 Thread J Decker
> The standards did not leave this open.  They define precisely what is > supposed to happen. > Really? I'll have to drop this whole lobbying effort then. That makes me sad that they didn't define it to be comparing of the numbers where there are overlaps in signed and unsigned instead of causin

Re: signed/unsigned comparison warning level

2010-09-26 Thread Ian Lance Taylor
J Decker writes: > Can the severity of signed/unsigned comparisons be raised, since GCC > does not properly handle the comparisons. GCC properly handles the comparisons according to the rules laid down in the C/C++ language standards. > int main() > > { > int s = -2; > unsigned int

signed/unsigned comparison warning level

2010-09-26 Thread J Decker
Can the severity of signed/unsigned comparisons be raised, since GCC does not properly handle the comparisons. Every example below is false compiled with gcc 4.5.0 int main() { int s = -2; unsigned int u = 0xFFFDU; if( s < u ) printf( "okay\n" );

Re: unsigned comparison warning

2008-07-30 Thread Hariharan
Thanks Ian. I will raise this in gcc-help mailing list. Cheers Hari Ian Lance Taylor wrote: Hariharan <[EMAIL PROTECTED]> writes: I found something rather strange with the unsigned comparison warnings in GCC. This is the wrong mailing list. The mailing list gcc@gcc.gnu.org is for gcc devel

Re: unsigned comparison warning

2008-07-29 Thread Ian Lance Taylor
Hariharan <[EMAIL PROTECTED]> writes: > I found something rather strange with the unsigned comparison warnings > in GCC. This is the wrong mailing list. The mailing list gcc@gcc.gnu.org is for gcc developers. The mailing list [EMAIL PROTECTED] is for questions about using gcc. Please take any

unsigned comparison warning

2008-07-29 Thread Hariharan
Hello, I found something rather strange with the unsigned comparison warnings in GCC. If i had, unsigned char a;