Description
Some C or C++ projects will attempt to run on various strange or bizarre platforms that are typically outside the area that Swift currently targets. In some cases these libraries define custom redefinitions of C standard library macros, such as UINT8_MAX. At present there does not seem to be a documented way to remove these entirely from accessibility in Swift via .apinote files, as they are not considered globals and there is no Macros: section for apinotes, nor are they considered Typedefs.
Reproduction
Try marking macros in a .apinote to have an Availability of nonswift
Expected behavior
That they can be removed or undefined in some capacity
Environment
Swift version 6.3.2 (swift-6.3.2-RELEASE)
Target: x86_64-unknown-windows-msvc
Build config: +assertions
Additional information
No response
Description
Some C or C++ projects will attempt to run on various strange or bizarre platforms that are typically outside the area that Swift currently targets. In some cases these libraries define custom redefinitions of C standard library macros, such as
UINT8_MAX. At present there does not seem to be a documented way to remove these entirely from accessibility in Swift via.apinotefiles, as they are not considered globals and there is noMacros:section for apinotes, nor are they consideredTypedefs.Reproduction
Try marking macros in a
.apinoteto have anAvailabilityofnonswiftExpected behavior
That they can be removed or undefined in some capacity
Environment
Swift version 6.3.2 (swift-6.3.2-RELEASE)
Target: x86_64-unknown-windows-msvc
Build config: +assertions
Additional information
No response