fix 64 bit integer printing for mingw
in order to do this I had to turn off -pedantic
This commit is contained in:
parent
58c13aa949
commit
6793548868
|
@ -179,7 +179,7 @@ include_directories(
|
|||
"${CMAKE_SOURCE_DIR}/src"
|
||||
)
|
||||
|
||||
set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -Werror -Wall -pedantic")
|
||||
set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -Werror -Wall")
|
||||
|
||||
set(EXE_CFLAGS "-std=c++11 -fno-exceptions -fno-rtti -D_GNU_SOURCE -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -Werror=strict-prototypes -Werror=old-style-definition -Werror=missing-prototypes")
|
||||
|
||||
|
|
|
@ -9,6 +9,7 @@
|
|||
|
||||
#include <assert.h>
|
||||
#include <math.h>
|
||||
#include <inttypes.h>
|
||||
|
||||
static void bignum_normalize(BigNum *bn) {
|
||||
assert(bn->kind == BigNumKindInt);
|
||||
|
@ -264,7 +265,8 @@ Buf *bignum_to_buf(BigNum *bn) {
|
|||
return buf_sprintf("%f", bn->data.x_float);
|
||||
} else {
|
||||
const char *neg = bn->is_negative ? "-" : "";
|
||||
return buf_sprintf("%s%llu", neg, bn->data.x_uint);
|
||||
uintmax_t value = bn->data.x_uint;
|
||||
return buf_sprintf("%s%" PRIuMAX, neg, value);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user