summaryrefslogtreecommitdiff
path: root/tests/t-constants.c
diff options
context:
space:
mode:
authortege <tege@gmplib.org>2001-01-09 03:46:49 +0100
committertege <tege@gmplib.org>2001-01-09 03:46:49 +0100
commitf0ea8326e1ad6cf5154e9d5231b90a71a7d373e4 (patch)
tree561148db94dbcb8cd1a4c4e3120b3450464ab509 /tests/t-constants.c
parent89b8e9f33cc5cb455f568080bae261f35d32c608 (diff)
downloadgmp-f0ea8326e1ad6cf5154e9d5231b90a71a7d373e4.tar.gz
Disable some undefined tests.
(CHECK_MAX_S): Remove workaround for gcc 2.95.2 bug recently added.
Diffstat (limited to 'tests/t-constants.c')
-rw-r--r--tests/t-constants.c17
1 files changed, 8 insertions, 9 deletions
diff --git a/tests/t-constants.c b/tests/t-constants.c
index 70fef53bb..6e58374a6 100644
--- a/tests/t-constants.c
+++ b/tests/t-constants.c
@@ -150,17 +150,10 @@ char *shrt_max_def = "not defined";
} while (0)
-/* gcc 2.95.2 -mpowerpc64 -maix64 needs "static" on maxval and minval or it
- thinks LONG_MAX<=LONG_MIN, at least when those values are decimal
- constants without "L"s as provided by the AIX 4.3 headers. Presumably
- some gremlin in the constant folding, or the type of big constants. (A
- constant bigger than an int should be interpreted as an unsigned or a
- long or an unsigned long, as necessary.) */
-
#define CHECK_MAX_S(max_val, max_name, min_val, min_name, type, format) \
do { \
- static type maxval = max_val; \
- static type minval = min_val; \
+ type maxval = max_val; \
+ type minval = min_val; \
type n = maxval; \
n++; \
if (n != minval) \
@@ -215,16 +208,22 @@ main (int argc, char *argv[])
CHECK_HIGHBIT (UINT_HIGHBIT, unsigned int, "0x%X");
CHECK_HIGHBIT (USHRT_HIGHBIT, unsigned short, "0x%hX");
CHECK_HIGHBIT (LONG_HIGHBIT, long, "0x%lX");
+#if 0 /* These are undefined! */
CHECK_HIGHBIT (INT_HIGHBIT, int, "0x%X");
CHECK_HIGHBIT (SHRT_HIGHBIT, short, "0x%hX");
+#endif
+#if 0 /* These are undefined! */
CHECK_MAX (LONG_MAX, LONG_MIN, long, "%ld");
CHECK_MAX (INT_MAX, INT_MIN, int, "%d");
CHECK_MAX (SHRT_MAX, SHRT_MIN, short, "%hd");
+#endif
CHECK_MAX (ULONG_MAX, 0, unsigned long, "%lu");
CHECK_MAX (UINT_MAX, 0, unsigned int, "%u");
CHECK_MAX (USHRT_MAX, 0, unsigned short, "%hu");
+#if 0 /* This is undefined! */
CHECK_MAX (MP_SIZE_T_MAX, MP_SIZE_T_MIN, mp_size_t, SS("%d","%ld"));
+#endif
/* UHWtype should have at least enough bits for half a UWtype */
{