mirror of
git://anongit.mindrot.org/openssh.git
synced 2025-04-17 12:47:09 +00:00
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@
This commit is contained in:
parent
049297de97
commit
8da801f585
10
aclocal.m4
vendored
10
aclocal.m4
vendored
@ -21,6 +21,16 @@ int main(int argc, char **argv) {
|
|||||||
double m = l / 0.5;
|
double m = l / 0.5;
|
||||||
long long int n = argc * 12345LL, o = 12345LL * (long long int)argc;
|
long long int n = argc * 12345LL, o = 12345LL * (long long int)argc;
|
||||||
printf("%d %d %d %f %f %lld %lld\n", i, j, k, l, m, n, o);
|
printf("%d %d %d %f %f %lld %lld\n", i, j, k, l, m, n, o);
|
||||||
|
/*
|
||||||
|
* Test fallthrough behaviour. clang 10's -Wimplicit-fallthrough does
|
||||||
|
* not understand comments and we don't use the "fallthrough" attribute
|
||||||
|
* that it's looking for.
|
||||||
|
*/
|
||||||
|
switch(i){
|
||||||
|
case 0: j += i;
|
||||||
|
/* FALLTHROUGH */
|
||||||
|
default: j += k;
|
||||||
|
}
|
||||||
exit(0);
|
exit(0);
|
||||||
}
|
}
|
||||||
]])],
|
]])],
|
||||||
|
Loading…
Reference in New Issue
Block a user