-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
__CFAllocatorRespectsHintZeroWhenAllocating not consistently declared extern C #5125
Comments
Hmm, still seeing this when adding Is there a reason it needs to be in ForFoundationOnly.h? |
It is there for historical reasons. We can move it to |
…der to avoid confusion over its linkage. Resolves swiftlang#5125
@lhoward are you saying this is new to 6.0.2 (vs 6.0)? |
I am, although it doesn't really make sense (given the prototype in ForFoundationOnly.h was committed in 2021). I'll try to find out the real reason. Edit: seeing this on 6.0 as well now. |
I can't easily explain why it's just started happening with one particular package I'm trying to build. But from first principles it seems that this always should have raised an error:
The only reasons I can think of as to why this didn't raise an error by default:
|
Actually, it's nothing to do with the visibility attribute. The issue is that Moving Why did I only see this now? Perhaps it was there all along since Swift 6 and something has changed WRT C++ interoperability (which I am using)? |
It makes sense that this could have started in 6.0 vs 6.0.2. Thanks for the investigation. |
…der to avoid confusion over its linkage. Resolves swiftlang#5125 (swiftlang#5126) (cherry picked from commit b1b4603)
Tangential: |
Let's file a new bug/get a new PR for reallocate ones. |
when ForFoundationOnly.h and ForSwiftFoundationOnly.h end up being imported, compile fails due to different linkage of
__CFAllocatorRespectsHintZeroWhenAllocating()
.suggest removing it from ForFoundationOnly.h or adding
CF_PRIVATE
.The text was updated successfully, but these errors were encountered: