This is the mail archive of the
mailing list for the GCC project.
Re: Strange conversion to int64
Tony Bernardin <email@example.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 firstname.lastname@example.org,
which is for gcc developers. It would be appropriate for
email@example.com. 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.