https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114033
--- Comment #4 from Iain Sandoe <iains at gcc dot gnu.org> --- (In reply to Francois-Xavier Coudert from comment #2) > This is latest released version: MacOSX13.3.sdk from CLT 15.1 (on macOS > 14.3). > I am attaching the preprocessed source. > > The code from CFData.h that is triggering this is: > > typedef CF_OPTIONS(CFOptionFlags, CFDataSearchFlags) { > kCFDataSearchBackwards = 1UL << 0, > kCFDataSearchAnchored = 1UL << 1 > } API_AVAILABLE(macos(10.6), ios(4.0), watchos(2.0), tvos(9.0)); > > which preprocesses to: > > typedef __attribute__((availability(swift,unavailable))) CFOptionFlags > CFDataSearchFlags; enum : CFDataSearchFlags { > kCFDataSearchBackwards = 1UL << 0, > kCFDataSearchAnchored = 1UL << 1 > } ; So - it seems we have an unguarded use of __attribute__ availability - we'll need to track back to why API_AVAILABLE is not DTRT. * I did post patches to enable us to consume the availability attribute, but did not have time to address review comments got GCC-14; although it would remain an option for darwin-local branches. > There is similar code linked to the error in CFString.h: > > typedef CF_OPTIONS(CFOptionFlags, CFStringCompareFlags) { > kCFCompareCaseInsensitive = 1, > kCFCompareBackwards = 4, /* Starting from the end of the > string */ > kCFCompareAnchored = 8, /* Only at the specified starting > point */ > kCFCompareNonliteral = 16, /* If specified, loose equivalence > is performed (o-umlaut == o, umlaut) */ > kCFCompareLocalized = 32, /* User's default locale is used for > the comparisons */ > kCFCompareNumerically = 64, /* Numeric comparison is used; that > is, Foo2.txt < Foo7.txt < Foo25.txt */ > kCFCompareDiacriticInsensitive API_AVAILABLE(macos(10.5), ios(2.0), > watchos(2.0), tvos(9.0)) = 128, /* If specified, ignores diacritics > (o-umlaut == o) */ > kCFCompareWidthInsensitive API_AVAILABLE(macos(10.5), ios(2.0), > watchos(2.0), tvos(9.0)) = 256, /* If specified, ignores width differences > ('a' == UFF41) */ > kCFCompareForcedOrdering API_AVAILABLE(macos(10.5), ios(2.0), > watchos(2.0), tvos(9.0)) = 512 /* If specified, comparisons are forced to > return either kCFCompareLessThan or kCFCompareGreaterThan if the strings are > equivalent but not strictly equal, for stability when sorting (e.g. "aaa" > > "AAA" with kCFCompareCaseInsensitive specified) */ > }; I guess the same glitch here.