-
Notifications
You must be signed in to change notification settings - Fork 440
_SwiftSyntaxCShims: rename Swift getter #2983
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
Conversation
@swift-ci please test |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why is _errno
a reserved C identifier? As far as I know only identifiers with two underscores and a lowercase letter or a single underscore followed by an uppercase letter are reserved.
Also, if we change this, I think we should also prefix _stdout
etc in swiftsyntax_stdio.h for consistency.
I can change
The same applies to C++. However, C++ additionally reserves any identifier with |
@swift-ci please test |
Hmm, interesting. I didn’t know about the external identifiers rule, assuming that external means external linkage here, the spec doesn’t seem to be clear on that. But then we shouldn’t prefix the symbol with an underscore at all, ie. change it to |
Yeah, anything with external linkage (though I think that there would be a conflict since I can strip the |
`_errno` is a C reserved identifier. Windows uses this reserved namespace and results in a collision. Rename the getter to namespace it and avoid the collision. Rename STDIO constants to maintain parity.
@swift-ci please test |
@swift-ci Please test |
@swift-ci please test Windows platform |
_errno
is a C reserved identifier. Windows uses this reserved namespace and results in a collision. Rename the getter to namespace it and avoid the collision.