summaryrefslogtreecommitdiff
path: root/mpz/export.c
diff options
context:
space:
mode:
authorKevin Ryde <user42@zip.com.au>2002-11-01 23:22:23 +0100
committerKevin Ryde <user42@zip.com.au>2002-11-01 23:22:23 +0100
commit894a35dea677ba82d950266047c187c22dcc73d1 (patch)
treec067e11a9bbe45abb7413a9c9a0c1caa72017df0 /mpz/export.c
parent49f34a63ea87055cacc931a1bc87bd3773b0ef57 (diff)
downloadgmp-894a35dea677ba82d950266047c187c22dcc73d1.tar.gz
* mpz/import.c, mpz/export.c: Use char* subract from NULL to get
pointer alignment, for the benefit of Cray vector systems. (This is an improvement, but -hnofastmd is required or the optimizer still gets it wrong.)
Diffstat (limited to 'mpz/export.c')
-rw-r--r--mpz/export.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/mpz/export.c b/mpz/export.c
index d3f001871..d074ff6fc 100644
--- a/mpz/export.c
+++ b/mpz/export.c
@@ -83,7 +83,7 @@ mpz_export (void *data, size_t *countp, int order,
if (endian == 0)
endian = HOST_ENDIAN;
- align = ((unsigned long) (char *) data) % sizeof (mp_limb_t);
+ align = ((char *) data - (char *) NULL) % sizeof (mp_limb_t);
if (nail == GMP_NAIL_BITS)
{