summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorvlefevre <vlefevre@280ebfd0-de03-0410-8827-d642c229c3f4>2020-02-27 10:45:30 +0000
committervlefevre <vlefevre@280ebfd0-de03-0410-8827-d642c229c3f4>2020-02-27 10:45:30 +0000
commit1dbd599ea7f6310574a639a09898147bb73c1aa8 (patch)
tree66fa152b510a21b7d9345a1e66da347a3bb4a9f0 /tools
parent38b6349d5f444bb8f51fa927c3dce53cf422cb09 (diff)
downloadmpfr-1dbd599ea7f6310574a639a09898147bb73c1aa8.tar.gz
[tools/mpfrlint] Detect the use of the non-underscore version of the
attribute names in mpfr.h (see README.dev). git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@13724 280ebfd0-de03-0410-8827-d642c229c3f4
Diffstat (limited to 'tools')
-rwxr-xr-xtools/mpfrlint6
1 files changed, 6 insertions, 0 deletions
diff --git a/tools/mpfrlint b/tools/mpfrlint
index bd3fbf961..cffffc2aa 100755
--- a/tools/mpfrlint
+++ b/tools/mpfrlint
@@ -141,6 +141,12 @@ err-if-output -t "" perl -ne '
and next;
print "Forbidden macro in mpfr.h line $.: $m\n" }' src/mpfr.h
+# Detect the use of the non-underscore version of the attribute names
+# in mpfr.h (as user code could define macros with such names).
+err-if-output \
+ --msg="In mpfr.h, use the underscore version of the attribute names." \
+ -t "attribute name" grep '__attribute__ *(( *[^_]' src/mpfr.h
+
# Test before other ones about preprocessing directives.
err-if-output \
--msg="Do not put spaces before a preprocessing directive" \