summaryrefslogtreecommitdiff
path: root/mpfr-impl.h
diff options
context:
space:
mode:
authorzimmerma <zimmerma@280ebfd0-de03-0410-8827-d642c229c3f4>2001-10-12 12:56:24 +0000
committerzimmerma <zimmerma@280ebfd0-de03-0410-8827-d642c229c3f4>2001-10-12 12:56:24 +0000
commitf8e253a8113b9abfe29b3de8291e1ea44e900899 (patch)
tree7804b88eea3c38b464dac54e8e236d0ebf53173f /mpfr-impl.h
parent7fb33e1b653edb976054e0bb98bbf3c821935e74 (diff)
downloadmpfr-f8e253a8113b9abfe29b3de8291e1ea44e900899.tar.gz
fixed MPFR_ASSERT
documented MPFR_ASSERTN and MPFR_ASSERTD git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@1244 280ebfd0-de03-0410-8827-d642c229c3f4
Diffstat (limited to 'mpfr-impl.h')
-rw-r--r--mpfr-impl.h7
1 files changed, 6 insertions, 1 deletions
diff --git a/mpfr-impl.h b/mpfr-impl.h
index a6f17b7a8..e5ec106b0 100644
--- a/mpfr-impl.h
+++ b/mpfr-impl.h
@@ -28,14 +28,19 @@ typedef unsigned long int mp_exp_unsigned_t;
/* Assertions */
+/* Compile with -DMPFR_DEBUG_LEVEL=<level> to change the debug level */
#ifndef MPFR_DEBUG_LEVEL
#define MPFR_DEBUG_LEVEL 20
#endif
#include <assert.h>
#define MPFR_ASSERT(level, expr) \
- if ((level) < MPFR_DEBUG_LEVEL && (assert(expr), 0))
+ ((void) ((level) < MPFR_DEBUG_LEVEL && (assert(expr), 0)))
+
+/* MPFR_ASSERTN(expr): assertion checked in the normal debug level */
#define MPFR_ASSERTN(expr) MPFR_ASSERT(16, expr)
+
+/* MPFR_ASSERTD(expr): assertion checked in debug level 33 or higher */
#define MPFR_ASSERTD(expr) MPFR_ASSERT(32, expr)
/* Definition of constants */