| author | |
| committer | |
| log | 6793548868749ac7638000182fe9b730179b2b82 |
| tree | aad447cc154861cb480568f5677b0cf66eb06fe3 |
| parent | 58c13aa949a571f4605ae1392cfd1e086fb820a7 |
in order to do this I had to turn off -pedantic2 files changed, 4 insertions(+), 2 deletions(-)
CMakeLists.txt+1-1| ... | @@ -179,7 +179,7 @@ include_directories( | ... | @@ -179,7 +179,7 @@ include_directories( |
| 179 | "${CMAKE_SOURCE_DIR}/src" | 179 | "${CMAKE_SOURCE_DIR}/src" |
| 180 | ) | 180 | ) |
| 181 | 181 | ||
| 182 | set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -Werror -Wall -pedantic") | 182 | set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -Werror -Wall") |
| 183 | 183 | ||
| 184 | 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") | 184 | 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") |
| 185 | 185 |
src/bignum.cpp+3-1| ... | @@ -9,6 +9,7 @@ | ... | @@ -9,6 +9,7 @@ |
| 9 | 9 | ||
| 10 | #include <assert.h> | 10 | #include <assert.h> |
| 11 | #include <math.h> | 11 | #include <math.h> |
| 12 | #include <inttypes.h> | ||
| 12 | 13 | ||
| 13 | static void bignum_normalize(BigNum *bn) { | 14 | static void bignum_normalize(BigNum *bn) { |
| 14 | assert(bn->kind == BigNumKindInt); | 15 | assert(bn->kind == BigNumKindInt); |
| ... | @@ -264,7 +265,8 @@ Buf *bignum_to_buf(BigNum *bn) { | ... | @@ -264,7 +265,8 @@ Buf *bignum_to_buf(BigNum *bn) { |
| 264 | return buf_sprintf("%f", bn->data.x_float); | 265 | return buf_sprintf("%f", bn->data.x_float); |
| 265 | } else { | 266 | } else { |
| 266 | const char *neg = bn->is_negative ? "-" : ""; | 267 | 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); | ||
| 268 | } | 270 | } |
| 269 | } | 271 | } |
| 270 | 272 |