Strange conversion to int64
Ian Lance Taylor
iant@google.com
Thu Jan 28 12:16:00 GMT 2010
Tony Bernardin <sarusama@gmail.com> writes:
> Hey, I'm having a little trouble understanding the conversion gcc is
> doing in a statement with the following types:
This question is not appropriate for the mailing list gcc@gcc.gnu.org,
which is for gcc developers. It would be appropriate for
gcc-help@gcc.gnu.org. Please take any followups to gcc-help. Thanks.
> int64 = int32 * uint32
According to the rules of the C++ language, this will convert the
int32 to uint32, do a uint32 multiplication producing a uint32 result,
and then zero extend the uint32 result to assign it to int64. This
seems consistent with the output you reported.
Ian
More information about the Gcc
mailing list