summaryrefslogtreecommitdiff
path: root/tools/mpfrlint
diff options
context:
space:
mode:
Diffstat (limited to 'tools/mpfrlint')
-rwxr-xr-xtools/mpfrlint6
1 files changed, 4 insertions, 2 deletions
diff --git a/tools/mpfrlint b/tools/mpfrlint
index 9c5aa0c5e..14c34c7cb 100755
--- a/tools/mpfrlint
+++ b/tools/mpfrlint
@@ -90,8 +90,10 @@ grep 'MPFR_ASSERT[DN][^a-z]*;' src/*.c | grep -v 'MPFR_ASSERTN *(0)' | \
grep -v '\(MPFR_EMIN_MIN\|MPFR_EXP_MIN\).*LONG_MIN' | \
grep -v MPFR_BLOCK_EXCEP
-# MPFR_ASSERTD or MPFR_ASSERTN must be used for assertions, not ASSERT.
-grep -E '[^_]ASSERT *(\(|$)' {src,tests}/*.c
+# ASSERT and ASSERT_ALWAYS must not be used for assertion checking.
+# Use MPFR_STAT_STATIC_ASSERT for static assertions, otherwise either
+# MPFR_ASSERTD (debug mode / hint for the compiler) or MPFR_ASSERTN.
+grep -E '[^_]ASSERT(_ALWAYS)? *(\(|$)' {src,tests}/*.c
# Use MPFR_TMP_LIMBS_ALLOC.
grep 'MPFR_TMP_ALLOC.*\(BYTES_PER_MP_LIMB\|sizeof.*mp_limb_t\)' src/*.c