[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 11:51:22 +1030 |
User-agent: |
Mutt/1.4i |
On Mon, Jan 12, 2004 at 02:02:31AM +0100, Bart Samwel wrote:
> OK, I understand why it wasn't there yet. If you're up to ANSI C++ now,
> a fix would be nice. :)
I'll put it on my TODO list. There are many other places that need
this sort of fix..
> >I think you are confused over the rules for the type of an integer
> >constant. Assuming 32 bit ints, the type of 0x7fffffff is "int", but
> >the type of 0x80000000 is "unsigned int". Thus ~0x8000000 is
> >0x7fffffff, *not* 0xffffffff7fffffff as you claim.
>
> Hmmm, then there is probably a bug in gas. The reason: why does the
> warning happen on 0xffffffff7fffffff instead of 0x000000007fffffff as
> the original value? Try using this code:
>
> foo: .long ~(0x80000000)
Interesting. The rules I was quoting were for ISO C90 rather than
gas. One answer for the gas behavour is that gas is using 64 bit ints
when configured for a 64 bit target.
--
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.,
Alan Modra <=
- 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, 2004/01/11
- 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