JoshuaWise / integer

Native 64-bit integers with overflow protection.
MIT License
19 stars 9 forks source link

compilation error #25

Closed fprijate closed 4 years ago

fprijate commented 4 years ago

Compiling with clang on win10 there is an error.

clang-cl : warning : argument unused during compilation: '/Gm-' [-Wunused-command-line-argument] [F:\TEST\fotoasistent\node _modules\better-sqlite3\node_modules\integer\bui
ld\integer.vcxproj]
..\src\integer.cpp(389,35): error : in-class initializer for static data member is not a constant expression [F:\TEST\fotoa sistent\node_modules\better-sqlite3\node_modules
\integer\build\integer.vcxproj]
static const int64_t MIN_VALUE = -0x8000000000000000LL;
^~~~~

Compiling with ms cl there is no error.

fprijate commented 4 years ago

clang version: 9.0.1

fprijate commented 4 years ago

static const int64_t MIN_VALUE = -0x8000000000000000LL; ^~~~~

there is an solution: static const int64_t MIN_VALUE = -0x7fffffffffffffffLL-1;

JoshuaWise commented 4 years ago

This is now fixed with integer 3.0.0.