Skip to content
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

[SR-1615] CoreFoundation should be audited for platform and architecture switches #4147

Open
phausler opened this issue May 25, 2016 · 1 comment

Comments

@phausler
Copy link
Member

Previous ID SR-1615
Radar None
Original Reporter @phausler
Type Bug
Additional Detail from JIRA
Votes 0
Component/s Foundation
Labels Bug, StarterBug
Assignee None
Priority Medium

md5: 2086366cd1be96fde97f8f4a0e88d88b

Issue Description:

All cases of fully enumerated switches of ported platforms should have a `#error Unsupported Platform` and fully enumerated switches of ported architecture should have a `#error Unsupported Architecture`.

If a code section has cases for all platforms or does not have a fallback case that is portable that the following deployment target macros are satisfied it should have an error case

```
DEPLOYMENT_TARGET_EMBEDDED
DEPLOYMENT_TARGET_EMBEDDED_MINI
DEPLOYMENT_TARGET_FREEBSD
DEPLOYMENT_TARGET_HPUX
DEPLOYMENT_TARGET_IPHONESIMULATOR
DEPLOYMENT_TARGET_LINUX
DEPLOYMENT_TARGET_MACOSX
DEPLOYMENT_TARGET_SOLARIS
DEPLOYMENT_TARGET_WINDOWS
```

Some patterns are currently either ignored in the unsupported case or they only emit a warning; these should be upgraded to an error. Reference https://github.com/apple/swift-corelibs-foundation/blob/master/CoreFoundation/Base.subproj/CFInternal.h#L453 for an example of what would be a fully enumerated switch that has missing elements that should be upgraded to an error.

@Dante-Broggi
Copy link

Is this resolved? If so, this should be closed.

@swift-ci swift-ci transferred this issue from apple/swift-issues Apr 25, 2022
@shahmishal shahmishal transferred this issue from apple/swift May 5, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants