From 4bfdab0de88488896d826b0f77a8dae3c164a486 Mon Sep 17 00:00:00 2001 From: Guillaume Melquiond <guillaume.melquiond@inria.fr> Date: Thu, 12 Jul 2018 19:17:37 +0200 Subject: [PATCH] Include generated headers instead of declaring functions on the fly. This avoids the following kind of warning messages: tests.c:113:20: warning: implicit declaration of function 'wmpn_add' [-Wimplicit-function-declaration] refc = wmpn_add (rp, ap, bp, an, bn); ^~~~~~~~ --- examples/multiprecision/tests.c | 17 +++++++---------- 1 file changed, 7 insertions(+), 10 deletions(-) diff --git a/examples/multiprecision/tests.c b/examples/multiprecision/tests.c index 4709e2dd3..39308081b 100644 --- a/examples/multiprecision/tests.c +++ b/examples/multiprecision/tests.c @@ -15,9 +15,15 @@ #ifdef TEST_MINIGMP #include "mini-gmp.c" -#else +#endif +#ifdef TEST_GMP #include <gmp.h> #endif +#ifdef TEST_WHY3 +#include "build/add.h" +#include "build/mul.h" +#include "build/div.h" +#endif #include "mt19937-64.c" #include <stdint.h> @@ -26,15 +32,6 @@ #include <sys/time.h> #include <time.h> -uint64_t add(uint64_t * r3, uint64_t * x4, uint64_t * y3, int32_t sx, int32_t - sy); - -void mul(uint64_t * r10, uint64_t * x11, uint64_t * y10, int32_t sx2, int32_t - sy2); - -void tdiv_qr(uint64_t * q, uint64_t * r, uint64_t * x, uint64_t * y, - int32_t sx, int32_t sy); - #define TMP_ALLOC_LIMBS(n) malloc((n) * 8) void mpn_dump(mp_ptr ap, mp_size_t an) { -- GitLab