summaryrefslogtreecommitdiff
path: root/TestScripts
diff options
context:
space:
mode:
authorJeffrey Walton <noloader@gmail.com>2017-03-01 23:40:47 -0500
committerJeffrey Walton <noloader@gmail.com>2017-03-01 23:40:47 -0500
commitab1477c7a566f51ac51d08688dae888742eee8c2 (patch)
tree01caa015985d267285decd0187e31e7ffd448883 /TestScripts
parentb791234b53944dce707de59796120fc824bb6bb1 (diff)
downloadcryptopp-git-ab1477c7a566f51ac51d08688dae888742eee8c2.tar.gz
Add GCC 7 warning checks (Issue 383)
Diffstat (limited to 'TestScripts')
-rwxr-xr-xTestScripts/cryptest.sh4
1 files changed, 4 insertions, 0 deletions
diff --git a/TestScripts/cryptest.sh b/TestScripts/cryptest.sh
index 6fa4d458..dedc2111 100755
--- a/TestScripts/cryptest.sh
+++ b/TestScripts/cryptest.sh
@@ -229,6 +229,7 @@ fi
# Now that the compiler is fixed, determine the compiler version for fixups
CLANG_37_OR_ABOVE=$("$CXX" -v 2>&1 | "$EGREP" -i -c 'clang version (3\.[7-9]|[4-9]\.[0-9])')
+GCC_70_OR_ABOVE=$("$CXX" -v 2>&1 | "$EGREP" -i -c 'gcc version (7\.[0-9]|[8-9])')
GCC_60_OR_ABOVE=$("$CXX" -v 2>&1 | "$EGREP" -i -c 'gcc version (6\.[0-9]|[7-9])')
GCC_51_OR_ABOVE=$("$CXX" -v 2>&1 | "$EGREP" -i -c 'gcc version (5\.[1-9]|[6-9])')
GCC_48_COMPILER=$("$CXX" -v 2>&1 | "$EGREP" -i -c 'gcc version 4\.8')
@@ -1073,6 +1074,9 @@ if [[ ("$GCC_COMPILER" -ne "0") ]]; then
WARNING_CXXFLAGS+=("-Wall" "-Wextra" "-Wno-unknown-pragmas" "-Wstrict-aliasing=3" "-Wstrict-overflow" "-Wcast-align"
"-Waggressive-loop-optimizations" "-Wwrite-strings" "-Wformat=2" "-Wformat-security" "-Wtrampolines")
+ if [[ ("$GCC_70_OR_ABOVE" -ne "0") ]]; then
+ WARNING_CXXFLAGS+=("-Wrestrict -Wduplicated-branches -Wregister")
+ fi
if [[ ("$GCC_60_OR_ABOVE" -ne "0") ]]; then
WARNING_CXXFLAGS+=("-Wshift-negative-value -Wshift-overflow=2 -Wnull-dereference -Wduplicated-cond -Wodr-type-mismatch")
fi