build: Check for -Wimplicit-fallthrough=5 separately
authorTimm Bäder <tbaeder@redhat.com>
Wed, 17 Feb 2021 09:27:06 +0000 (10:27 +0100)
committerMark Wielaard <mark@klomp.org>
Mon, 1 Mar 2021 22:46:20 +0000 (23:46 +0100)
commitd6c85cff9df027ea3972f021d674f96b9bd9d9db
tree34158f6a2d5f96e2b2fd9f9a8bf62f2841b20aea
parent5e77688768575f8cdf978c726403a56a09789a3c
build: Check for -Wimplicit-fallthrough=5 separately

GCC accepts the =5, which means it doesn't try to parse any comments
and only accepts the fallthrough attribute in code. Clang does not ever
parse any comments and always wants the fallthrough attribute anyway.
Clang also doesn't accept the =n parameter for -Wimplicit-fallthrough.

Test for =5 separately and use it if supported and fall back to just
-Wimplicit-fallthrough otherwise.

Signed-off-by: Timm Bäder <tbaeder@redhat.com>
config/eu.am
configure.ac