在 2024-04-10 17:52, Xi Ruoyao via Gcc-help 写道: > No, the OP is still thinking it's a wrong-code. Would you read the Subject please? u32 x = a * b; u64 r = x; return r; This is same as u32 x = (int) a * (int) b; u64 r = x; return r; and return (u64)(u32) ((int) a * (int) b); The code requests an `int` be zero-extended to a `u64` (if the result is written to EAX then this is no-op), but GCC performs sign extension anyway. Do you still consider it not a bug? -- Best regards, LIU Hao