summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog10
-rw-r--r--configure.ac2
-rw-r--r--gmp-impl.h10
-rw-r--r--tests/devel/try.c14
-rw-r--r--tests/mpf/t-fits.c4
-rw-r--r--tests/mpz/t-fits.c4
-rw-r--r--tests/t-constants.c9
7 files changed, 11 insertions, 42 deletions
diff --git a/ChangeLog b/ChangeLog
index 4372a9cf8..4cbe088ed 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,13 @@
+2015-06-23 Torbjörn Granlund <torbjorng@google.com>
+
+ * gmp-impl.h: Remove K&R stringize support.
+ * tests/devel/try.c: Likewise.
+ * tests/t-constants.c: Likewise.
+ * tests/mpf/t-fits.c: Likewise.
+ * tests/mpz/t-fits.c: Likewise.
+
+ * configure.ac (AC_C_STRINGIZE): Remove.
+
2015-06-15 Marco Bodrato <bodrato@mail.dm.unipi.it>
* tests/devel/try.c: Support mpn_sqrt (sqrtrem with remainder = NULL).
diff --git a/configure.ac b/configure.ac
index 3e55c2451..40d269684 100644
--- a/configure.ac
+++ b/configure.ac
@@ -2708,8 +2708,6 @@ AC_TYPE_SIGNAL
AC_CHECK_TYPES([intmax_t, long double, long long, ptrdiff_t, quad_t,
uint_least32_t, intptr_t])
-AC_C_STRINGIZE
-
# FIXME: Really want #ifndef __cplusplus around the #define volatile
# replacement autoconf gives, since volatile is always available in C++.
# But we don't use it in C++ currently.
diff --git a/gmp-impl.h b/gmp-impl.h
index 6b3499854..68eb629c1 100644
--- a/gmp-impl.h
+++ b/gmp-impl.h
@@ -2327,11 +2327,7 @@ struct fft_table_nk
/* ASSERT() is a private assertion checking scheme, similar to <assert.h>.
ASSERT() does the check only if WANT_ASSERT is selected, ASSERT_ALWAYS()
does it always. Generally assertions are meant for development, but
- might help when looking for a problem later too.
-
- Note that strings shouldn't be used within the ASSERT expression,
- eg. ASSERT(strcmp(s,"notgood")!=0), since the quotes upset the "expr"
- used in the !HAVE_STRINGIZE case (ie. K&R). */
+ might help when looking for a problem later too. */
#ifdef __LINE__
#define ASSERT_LINE __LINE__
@@ -2348,11 +2344,7 @@ struct fft_table_nk
__GMP_DECLSPEC void __gmp_assert_header (const char *, int);
__GMP_DECLSPEC void __gmp_assert_fail (const char *, int, const char *) ATTRIBUTE_NORETURN;
-#if HAVE_STRINGIZE
#define ASSERT_FAIL(expr) __gmp_assert_fail (ASSERT_FILE, ASSERT_LINE, #expr)
-#else
-#define ASSERT_FAIL(expr) __gmp_assert_fail (ASSERT_FILE, ASSERT_LINE, "expr")
-#endif
#define ASSERT_ALWAYS(expr) \
do { \
diff --git a/tests/devel/try.c b/tests/devel/try.c
index 18fbbcbc6..76542ca41 100644
--- a/tests/devel/try.c
+++ b/tests/devel/try.c
@@ -735,21 +735,12 @@ param_init (void)
#define COPY(index) memcpy (p, &param[index], sizeof (*p))
-#if HAVE_STRINGIZE
#define REFERENCE(fun) \
p->reference = (tryfun_t) fun; \
p->reference_name = #fun
#define VALIDATE(fun) \
p->validate = fun; \
p->validate_name = #fun
-#else
-#define REFERENCE(fun) \
- p->reference = (tryfun_t) fun; \
- p->reference_name = "fun"
-#define VALIDATE(fun) \
- p->validate = fun; \
- p->validate_name = "fun"
-#endif
p = &param[TYPE_ADD_N];
@@ -1729,13 +1720,8 @@ struct choice_t {
mp_size_t minsize;
};
-#if HAVE_STRINGIZE
#define TRY(fun) #fun, (tryfun_t) fun
#define TRY_FUNFUN(fun) #fun, (tryfun_t) fun##_fun
-#else
-#define TRY(fun) "fun", (tryfun_t) fun
-#define TRY_FUNFUN(fun) "fun", (tryfun_t) fun/**/_fun
-#endif
const struct choice_t choice_array[] = {
{ TRY(mpn_add), TYPE_ADD },
diff --git a/tests/mpf/t-fits.c b/tests/mpf/t-fits.c
index 3964a13d0..a890b398f 100644
--- a/tests/mpf/t-fits.c
+++ b/tests/mpf/t-fits.c
@@ -38,11 +38,7 @@ the GNU MP Library test suite. If not, see https://www.gnu.org/licenses/. */
error = 1; \
}
-#if HAVE_STRINGIZE
#define EXPECT(fun,answer) EXPECT_S(fun,#fun,answer)
-#else
-#define EXPECT(fun,answer) EXPECT_S(fun,"fun",answer)
-#endif
int
main (void)
diff --git a/tests/mpz/t-fits.c b/tests/mpz/t-fits.c
index b1db21657..6b6de3b29 100644
--- a/tests/mpz/t-fits.c
+++ b/tests/mpz/t-fits.c
@@ -39,11 +39,7 @@ the GNU MP Library test suite. If not, see https://www.gnu.org/licenses/. */
error = 1; \
}
-#if HAVE_STRINGIZE
#define EXPECT(fun,answer) EXPECT_S(fun,#fun,answer)
-#else
-#define EXPECT(fun,answer) EXPECT_S(fun,"fun",answer)
-#endif
int
main (void)
diff --git a/tests/t-constants.c b/tests/t-constants.c
index 8583ccd4d..9f22931c1 100644
--- a/tests/t-constants.c
+++ b/tests/t-constants.c
@@ -176,21 +176,12 @@ const char *shrt_max_def = "not defined";
} while (0)
-#if HAVE_STRINGIZE
#define CHECK_LIMB(x,y) CHECK_LIMB_S (x, #x, y, #y)
#define CHECK_INT(x,y) CHECK_INT_S (x, #x, y, #y)
#define CHECK_CONDITION(x) CHECK_CONDITION_S (x, #x)
#define CHECK_BITS(c,t) CHECK_BITS_S (c, #c, t)
#define CHECK_MAX(m,n,t,f) CHECK_MAX_S (m, #m, n, #n, t, f)
#define CHECK_HIGHBIT(n,t,f) CHECK_HIGHBIT_S (n, #n, t, f)
-#else
-#define CHECK_LIMB(x,y) CHECK_LIMB_S (x, "x", y, "y")
-#define CHECK_INT(x,y) CHECK_INT_S (x, "x", y, "y")
-#define CHECK_CONDITION(x) CHECK_CONDITION_S (x, "x")
-#define CHECK_BITS(c,t) CHECK_BITS_S (c, "c", t)
-#define CHECK_MAX(m,n,t,f) CHECK_MAX_S (m, "m", n, "n", t, f)
-#define CHECK_HIGHBIT(n,t,f) CHECK_HIGHBIT_S (n, "n", t, f)
-#endif
/* The tests below marked "Bad!" fail on Cray T90 systems, where int, short