Source-Changes-D archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: CVS commit: src/sys/sys
In article <20180308215453.GB22758%britannica.bec.de@localhost>,
Joerg Sonnenberger <joerg%bec.de@localhost> wrote:
>On Thu, Mar 08, 2018 at 03:32:33PM -0500, Christos Zoulas wrote:
>> Module Name: src
>> Committed By: christos
>> Date: Thu Mar 8 20:32:33 UTC 2018
>>
>> Modified Files:
>> src/sys/sys: bitops.h
>>
>> Log Message:
>> PR/53081: Fix size of the shift to depend on the type of the bitmap so that
>> we get the correct width.
>
>Please don't use __typeof__. 1ull is good enough and we can depend on
>a non-stupid compiler to truncate the intermediate.
The __typeof__ ship has already sailed:
$ fgrep -r __typeof__ /usr/include/sys/ | wc -l
3
Not counting all the c++ header uses...
Doing a 64 bit calculation on a 32 bit platform when it is not needed
is a waste (and produces narrowing warnings).
christos
Home |
Main Index |
Thread Index |
Old Index