[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH] gas value truncation warning reports truncated values, doesn
From: |
Alan Modra |
Subject: |
Re: [PATCH] gas value truncation warning reports truncated values, doesn't look at signedness. |
Date: |
Mon, 12 Jan 2004 12:00:57 +1030 |
User-agent: |
Mutt/1.4i |
On Mon, Jan 12, 2004 at 02:20:25AM +0100, Bart Samwel wrote:
> In 64-bit, ~0x80000000 is 0xffffffff7fffffff.
True if int is 64 bits. Note that most (all?) 64 bit gcc targets
have a 32 bit int. I'm harping on about this because it's a common
error to think ~0x80000000 is something other than 0x7fffffff when
writing C for a 64 bit target. Try this:
#include <stdio.h>
int main (void)
{
long long x = ~0x80000000;
printf ("%llx\n", x);
return 0;
}
--
Alan Modra
IBM OzLabs - Linux Technology Centre
- [PATCH] gas value truncation warning reports truncated values, doesn't look at signedness., Bart Samwel, 2004/01/11
- Re: [PATCH] gas value truncation warning reports truncated values, doesn't look at signedness., Alan Modra, 2004/01/11
- Re: [PATCH] gas value truncation warning reports truncated values, doesn't look at signedness., Bart Samwel, 2004/01/11
- Re: [PATCH] gas value truncation warning reports truncated values, doesn't look at signedness., Bart Samwel, 2004/01/11
- Re: [PATCH] gas value truncation warning reports truncated values, doesn't look at signedness.,
Alan Modra <=
- Re: [PATCH] gas value truncation warning reports truncated values, doesn't look at signedness., Bart Samwel, 2004/01/12
- Re: [PATCH] gas value truncation warning reports truncated values, doesn't look at signedness., Alan Modra, 2004/01/12
- Re: [PATCH] gas value truncation warning reports truncated values, doesn't look at signedness., Bart Samwel, 2004/01/12
- Re: [PATCH] gas value truncation warning reports truncated values, doesn't look at signedness., Alan Modra, 2004/01/12
- Re: [PATCH] gas value truncation warning reports truncated values, doesn't look at signedness., Bart Samwel, 2004/01/12
- Re: [PATCH] gas value truncation warning reports truncated values, doesn't look at signedness., Alan Modra, 2004/01/12
- Re: [PATCH] gas value truncation warning reports truncated values, doesn't look at signedness., Bart Samwel, 2004/01/12
- [PATCH] Current Alpha VMS support, Bernard Giroud, 2004/01/13
- Re: [PATCH] Current Alpha VMS support, Nick Clifton, 2004/01/26
- Re: [PATCH] gas value truncation warning reports truncated values, doesn't look at signedness., Bart Samwel, 2004/01/15