In article <20180308215453.gb22...@britannica.bec.de>,
Joerg Sonnenberger  <jo...@bec.de> 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

Reply via email to