summaryrefslogtreecommitdiff
path: root/gmp-h.in
diff options
context:
space:
mode:
authorKevin Ryde <user42@zip.com.au>2002-10-23 01:47:53 +0200
committerKevin Ryde <user42@zip.com.au>2002-10-23 01:47:53 +0200
commitdd81700f489761b1db9d6bf68527800b7178b5ce (patch)
treeaeb6c012101d0eda059deddda2cd95d3a30c55a6 /gmp-h.in
parent0cb5b57af92d8b9dc759820b0a4e1e9934d3b522 (diff)
downloadgmp-dd81700f489761b1db9d6bf68527800b7178b5ce.tar.gz
* gmp-h.in (__GMP_ATTRIBUTE_PURE): Suppress this when
__GMP_NO_ATTRIBUTE_CONST_PURE is defined.
Diffstat (limited to 'gmp-h.in')
-rw-r--r--gmp-h.in5
1 files changed, 3 insertions, 2 deletions
diff --git a/gmp-h.in b/gmp-h.in
index a2048e97b..4a531544e 100644
--- a/gmp-h.in
+++ b/gmp-h.in
@@ -337,8 +337,9 @@ typedef __mpq_struct *mpq_ptr;
/* "pure" is in gcc 2.96 and up, see "(gcc)Function Attributes". Basically
it means a function does nothing but examine its arguments and memory
(global or via arguments) to generate a return value, but changes nothing
- and has no side-effects. */
-#if __GMP_GNUC_PREREQ (2,96)
+ and has no side-effects. __GMP_NO_ATTRIBUTE_CONST_PURE lets
+ tune/common.c etc turn this off when trying to write timing loops. */
+#if __GMP_GNUC_PREREQ (2,96) && ! defined (__GMP_NO_ATTRIBUTE_CONST_PURE)
#define __GMP_ATTRIBUTE_PURE __attribute__ ((__pure__))
#else
#define __GMP_ATTRIBUTE_PURE