bug-binutils
[Top][All Lists]
Advanced

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

Re: [PATCH] gas value truncation warning reports truncated values, does


From: Bart Samwel
Subject: Re: [PATCH] gas value truncation warning reports truncated values, doesn't look at signedness.
Date: Mon, 12 Jan 2004 02:20:25 +0100
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.6b) Gecko/20031221 Thunderbird/0.4

Alan Modra wrote:
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.  Note also that the
rules for decimal constants are different to those for octal and
hexadecimal.

Latest news from the linux-kernel list: we compile with --enable-64-bit-bfd (Debian does this by default, it seems). So, we're talking 64-bit. In 64-bit, ~0x80000000 is 0xffffffff7fffffff.

-- Bart




reply via email to

[Prev in Thread] Current Thread [Next in Thread]