authorgravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2016-02-16 20:21:37-07:00
committergravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2016-02-16 20:21:37-07:00
log6793548868749ac7638000182fe9b730179b2b82
treeaad447cc154861cb480568f5677b0cf66eb06fe3
parent58c13aa949a571f4605ae1392cfd1e086fb820a7

fix 64 bit integer printing for mingw

in order to do this I had to turn off -pedantic

2 files changed, 4 insertions(+), 2 deletions(-)

CMakeLists.txt+1-1
......@@ -179,7 +179,7 @@ include_directories(
179179 "${CMAKE_SOURCE_DIR}/src"
180180)
181181
182set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -Werror -Wall -pedantic")
182set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -Werror -Wall")
183183
184184set(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")
185185
src/bignum.cpp+3-1
......@@ -9,6 +9,7 @@
99
1010#include <assert.h>
1111#include <math.h>
12#include <inttypes.h>
1213
1314static void bignum_normalize(BigNum *bn) {
1415 assert(bn->kind == BigNumKindInt);
......@@ -264,7 +265,8 @@ Buf *bignum_to_buf(BigNum *bn) {
264265 return buf_sprintf("%f", bn->data.x_float);
265266 } else {
266267 const char *neg = bn->is_negative ? "-" : "";
267 return buf_sprintf("%s%llu", neg, bn->data.x_uint);
268 uintmax_t value = bn->data.x_uint;
269 return buf_sprintf("%s%" PRIuMAX, neg, value);
268270 }
269271}
270272