diff options
author | vlefevre <vlefevre@280ebfd0-de03-0410-8827-d642c229c3f4> | 2016-02-29 18:07:10 +0000 |
---|---|---|
committer | vlefevre <vlefevre@280ebfd0-de03-0410-8827-d642c229c3f4> | 2016-02-29 18:07:10 +0000 |
commit | 3ad2c80ac2daef65b035ce450e16ce08c39c1e7d (patch) | |
tree | 404b77b98340e2978d4746ca8d87776981f7f670 /tools | |
parent | 79acbddc16b99de271135ad4f8fad7d0bb0e2f6f (diff) | |
download | mpfr-3ad2c80ac2daef65b035ce450e16ce08c39c1e7d.tar.gz |
[tools/mpfrlint] ASSERT and ASSERT_ALWAYS must not be used for
assertion checking.
(merge changesets r8123,8589,10147 from the trunk, only for mpfrlint)
git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/branches/3.1@10148 280ebfd0-de03-0410-8827-d642c229c3f4
Diffstat (limited to 'tools')
-rwxr-xr-x | tools/mpfrlint | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/tools/mpfrlint b/tools/mpfrlint index eb0578ac7..757d4e175 100755 --- a/tools/mpfrlint +++ b/tools/mpfrlint @@ -48,6 +48,11 @@ grep '[^a-z_]snprintf *([^)]' $srctests # This test is a heuristic. grep 'MPFR_ASSERTD[^a-z]*;' src/*.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 |