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-2848] GCC_WARN_UNUSED_VARIABLE has no effect #45442

Open
swift-ci opened this issue Oct 4, 2016 · 3 comments
Open

[SR-2848] GCC_WARN_UNUSED_VARIABLE has no effect #45442

swift-ci opened this issue Oct 4, 2016 · 3 comments
Labels
bug A deviation from expected or documented behavior. Also: expected but undesirable behavior. compiler The Swift compiler in itself

Comments

@swift-ci
Copy link
Collaborator

swift-ci commented Oct 4, 2016

Previous ID SR-2848
Radar None
Original Reporter Alex (JIRA User)
Type Bug
Environment

Xcode 8.0 (8A218a)

Additional Detail from JIRA
Votes 0
Component/s Compiler
Labels Bug
Assignee None
Priority Medium

md5: 2e92d416a610564a0b16e84b62466bc1

Issue Description:

When GCC_WARN_UNUSED_VARIABLE is disabled unused variables continue produce warning.

How to reproduce:

  1. Set No to Build Settings/Apple LLVM 8.0 Warnings - All languages/Unused Variables
  2. Add unused local variable e.g.
let unusedVariable = true

Result:

@belkadan
Copy link
Contributor

belkadan commented Oct 5, 2016

Swift doesn't currently have toggleable warnings, but if we did then yes it would make sense for Xcode to control this.

@swift-ci
Copy link
Collaborator Author

swift-ci commented Oct 5, 2016

Comment by Alex Matjuk (JIRA)

Should I create a ticket for toggleable warnings feature then?

@belkadan
Copy link
Contributor

belkadan commented Oct 5, 2016

We have a Radar already. It's mostly that it's controversial (adding toggleable warnings results in language dialects). If we had some standard linter tool we could put toggleable things there, but there isn't a standard one.

@swift-ci swift-ci transferred this issue from apple/swift-issues Apr 25, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug A deviation from expected or documented behavior. Also: expected but undesirable behavior. compiler The Swift compiler in itself
Projects
None yet
Development

No branches or pull requests

2 participants