Revert "Simplify the checks for supported compiler warning flags"
Doesn't compile on either GCC 5.2.1 (the CI) or 6.3.1 (my laptop).
This reverts commit 26918c8c3afe21e801d00774c2bf7ee3e2bc5ecd.