swift-corelibs-libdispatch: dispatch.h incompatible with gcc / g++ 12

$ echo "#include <dispatch/dispatch.h>" > foo.c
$ gcc foo.c 
In file included from /usr/include/dispatch/dispatch.h:32,
                 from foo.c:1:
/usr/include/os/generic_unix_base.h:58:18: error: missing binary operator before token "("
   58 | #if __has_feature(assume_nonnull)
      |                  ^
/usr/include/os/generic_unix_base.h:72:18: error: missing binary operator before token "("
   72 | #if __has_feature(attribute_availability_swift)
      |                  ^
/usr/include/os/generic_unix_base.h:97:18: error: missing binary operator before token "("
   97 | #if __has_feature(objc_fixed_enum) || __has_extension(cxx_strong_enums)
      |                  ^

About this issue

Most upvoted comments