bug-gawk
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [bug-gawk] builtin.c:warning: shifting a negative signed value is un


From: Sergey Tselikh
Subject: Re: [bug-gawk] builtin.c:warning: shifting a negative signed value is undefined
Date: Sat, 19 Nov 2016 17:15:23 +0000

It is quite possible, that ``~ (t) 0'' in that macro should be ``(t) 1''.
On two's complement (and ones' complement) systems a signed integer has minimum value when its most significant bit is set to 1 and rest of bits are set to 0. Only one bit with value 1 is needed on the left side of ``<<'' operation.


18 нояб. 2016 г. 22:00 пользователь "Hermann Peifer" <address@hidden> написал:
Hi,

Just in case it would be helpful: attached 2 compiler warnings which I
am getting since I recently upgraded to macOS 10.12

Hermann

$ gcc --version
Configured with: --prefix=/Applications/Xcode.app/Contents/Developer/usr
--with-gxx-include-dir=/usr/include/c++/4.2.1
Apple LLVM version 8.0.0 (clang-800.0.42.1)
Target: x86_64-apple-darwin16.1.0
Thread model: posix
InstalledDir:
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin

Attachment: builtin-c-not0-to-1.patch
Description: Binary data


reply via email to

[Prev in Thread] Current Thread [Next in Thread]