[CLN-list] Shift overflow?

Bruno Haible bruno at clisp.org
Mon Jan 7 08:00:10 CET 2019


Hi,

David van der Spoel wrote:
> I am compiling 1.3.4 using gcc 8.2 and get these warnings:
> 
> ./base/cl_macros.h:119:26: warning: result of '(2 << 63)' requires 66 
> bits to represent, but 'long long in' only has 64 bits [-Wshift-overflow=]
>       #define bitm(n)  (2LL<<((n)-1))
>                         ~~~^~~~~~~~~

The attached patch will fix it. Thanks for the report.

Bruno
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-Fix-warnings-from-gcc-s-Wshift-overflow.patch
Type: text/x-patch
Size: 1188 bytes
Desc: not available
URL: <http://www.cebix.net/pipermail/cln-list/attachments/20190107/986b7729/attachment.bin>


More information about the CLN-list mailing list