summaryrefslogtreecommitdiff
path: root/aclocal.m4
diff options
context:
space:
mode:
authorDarren Tucker <dtucker@dtucker.net>2020-06-05 13:20:10 +1000
committerDarren Tucker <dtucker@dtucker.net>2020-06-05 13:20:10 +1000
commit8da801f585dd9c534c0cbe487a3b1648036bf2fb (patch)
treef513eb25009a0702265299dedf150ac3a887b702 /aclocal.m4
parent049297de975b92adcc2db77e3fb7046c0e3c695d (diff)
Test fallthrough in OSSH_CHECK_CFLAG_COMPILE.
clang 10's -Wimplicit-fallthrough does not understand /* FALLTHROUGH */ comments and we don't use the __attribute__((fallthrough)) that it's looking for. This has the effect of turning off -Wimplicit-fallthrough where it does not currently help (particularly with -Werror). ok djm@
Diffstat (limited to 'aclocal.m4')
-rw-r--r--aclocal.m410
1 files changed, 10 insertions, 0 deletions
diff --git a/aclocal.m4 b/aclocal.m4
index 25ecc49a2..0193c3dcc 100644
--- a/aclocal.m4
+++ b/aclocal.m4
@@ -21,6 +21,16 @@ int main(int argc, char **argv) {
21 double m = l / 0.5; 21 double m = l / 0.5;
22 long long int n = argc * 12345LL, o = 12345LL * (long long int)argc; 22 long long int n = argc * 12345LL, o = 12345LL * (long long int)argc;
23 printf("%d %d %d %f %f %lld %lld\n", i, j, k, l, m, n, o); 23 printf("%d %d %d %f %f %lld %lld\n", i, j, k, l, m, n, o);
24 /*
25 * Test fallthrough behaviour. clang 10's -Wimplicit-fallthrough does
26 * not understand comments and we don't use the "fallthrough" attribute
27 * that it's looking for.
28 */
29 switch(i){
30 case 0: j += i;
31 /* FALLTHROUGH */
32 default: j += k;
33 }
24 exit(0); 34 exit(0);
25} 35}
26 ]])], 36 ]])],