[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH 0/2] avoid integer overflow
From: |
Peter Maydell |
Subject: |
Re: [PATCH 0/2] avoid integer overflow |
Date: |
Mon, 16 Mar 2020 12:56:53 +0000 |
On Mon, 16 Mar 2020 at 12:25, Yifei Jiang <address@hidden> wrote:
>
> the constant default type is "int", when the constant is shifted to the left,
> it may exceed 32 bits, resulting in integer overflowing. So constant type need
> change to "long"
"long" would not in general be the right type to use in cases where
we do need to make this change, because "long" also can
be only 32 bits wide on some hosts.
thanks
-- PMM