Messages in this thread | | | Date | Wed, 16 Jan 2008 15:42:57 +0000 | From | "Jan Beulich" <> | Subject | Re: [PATCH 0 of 4] x86: some more patches |
| |
>Yes, but if you cast to long the result will be 32bit again. Or do you >rely on it being always used in 64bit signed context with sign extension? >While that might work it would seem rather fragile to me, just asking >for similar future bugs.
Even if conversion is to 64-bit unsigned, the value (being signed) will be sign-extended first (to preserve its value modulo 2**<target type width>).
Jan
| |