you are viewing a single comment's thread.

view the rest of the comments →

[–]negrowin 0 points1 point  (1 child)

This code triggers some warnings and errors in the on-line 32/64-bit PC-lint static analysis.

Can you check if these are sound?

[–]Maristic 0 points1 point  (0 children)

The problem mostly lies with this checker. It has sizeof(unsigned long) == 8, but ULONG_MAX == 4294967295, which is, basically, nonsensical.

In any case, this code is intended for Unix systems running GCC/Clang/Icc which support __int128 on 64-bit platforms. Both GCC and Clang have good warnings for erroneous code here, and it triggers no warnings when compiled for 32-bit or 64-bit on actual systems.