In file included from ../../common/vm/vm_pagelist.c:59:0:
../../common/vm/vm_pagelist.c: In function 'page_ctr_sub_internal':
../../i86pc/vm/vm_dep.h:70:36: error: left shift of negative value [-Werror=shift-negative-value]
plcnt_inc_dec(pp, mtype, szc, -1l << PAGE_BSZS_SHIFT(szc), flags)
../../common/vm/vm_pagelist.c:879:2: note: in expansion of macro 'PLCNT_DECR'
PLCNT_DECR(pp, mnode, mtype, pp->p_szc, flags);
cc1: all warnings being treated as errors
Loading file attachments...
So the function takes a long as an argument. I suspect that the reason we're here is that the compiler ...
So the function takes a long as an argument. I suspect that the reason we're here is that the compiler doesn't want to shift the negative number and assume the two's complement layout necessarily or something similar.
Should we be casting the result of the ULONG_MAX << ... to a long explicitly?