```c
unsigned int x1 = 0xaeb1c2aa;
unsigned int x2 = 0xaeb1c2aa;
long long r_whole = (signed long long)x1 * (signed long long)x2;
printf("r_whole = %lld\n",r_whole);
```
输出的结果是无符号乘法的结果:
```
r_whole = 8590088583138384100
```
而下面的程序
```
unsigned int x1 = 0xaeb1c2aa;
unsigned int x2 = 0xaeb1c2aa;
int xx1 = x1;
int xx2 = x2;
long long r_whole = (signed long long)xx1 * (signed long long)xx2;
printf("r_whole = %lld\n",r_whole);
```
输出的事有符号乘法的结果:
```
r_whole = 1860719719092984036
```
第一段程序里我不是对 x1 进行强制类型转换了吗 |
|