rewrite fallthrough to HEIM_FALLTHROUGH to deal with new Apple SDKs
Apple clang version 14.0.0 (clang-1400.0.17.3.1) fails the build because stds.h defines `fallthrough` as a macro which is then expanded when base.h evaluates # if __has_attribute(fallthrough) && __clang_major__ >= 5 The macOS SDK defines `DISPATCH_FALLTHROUGH` as the macro instead of `fallthrough`. This change replaces the use of `fallthrough` in the tree with `HEIM_FALLTHROUGH` and updates the declaration in configure logic to define `HEIM_FALLTHROUGH` based upon existing definitions (if any) of `fallthrough` or `DISPATCH_FALLTHROUGH`.
This commit is contained in:

committed by
Jeffrey Altman

parent
f6d26bce66
commit
133f517482
@@ -148,7 +148,7 @@ int teardown_test(void)
|
||||
|
||||
strcmp(dirname + len + 1 - sizeof(TESTDIR)/sizeof(char), TESTDIR) == 0) {
|
||||
|
||||
fallthrough;
|
||||
HEIM_FALLTHROUGH;
|
||||
|
||||
} else {
|
||||
/* did we create the directory? */
|
||||
@@ -162,7 +162,7 @@ int teardown_test(void)
|
||||
fprintf(stderr, "Can't change to test directory. Aborting cleanup.\n");
|
||||
return -1;
|
||||
} else {
|
||||
fallthrough;
|
||||
HEIM_FALLTHROUGH;
|
||||
}
|
||||
} else {
|
||||
return -1;
|
||||
|
Reference in New Issue
Block a user