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-2404] Swift silently doesn't use -D flag if you assign a value to it (e.g. -DDEBUG=1) #45011

Closed
belkadan opened this issue Aug 19, 2016 · 2 comments
Assignees
Labels
bug A deviation from expected or documented behavior. Also: expected but undesirable behavior. compiler The Swift compiler in itself good first issue Good for newcomers

Comments

@belkadan
Copy link
Contributor

Previous ID SR-2404
Radar rdar://problem/22157790
Original Reporter @belkadan
Type Bug
Status Resolved
Resolution Done
Additional Detail from JIRA
Votes 0
Component/s Compiler
Labels Bug, StarterBug
Assignee @CodaFi
Priority Medium

md5: a01133e8f636613e7b7012a9ceb819d8

Issue Description:

If people use non-identifier -D flags with Swift assuming that it works the same as C, the compiler just throws that away. (Actually, it's probably dutifully adding a custom condition that just can't ever be typed.) We should produce an error on a non-identifier -D flag (as determined by Lexer::isIdentifier), possibly with special cases for =.

@swift-ci
Copy link
Collaborator

Comment by Erik Verbruggen (JIRA)

#6813

@CodaFi
Copy link
Member

CodaFi commented Jun 14, 2017

Fix is merged in #10248

@swift-ci swift-ci transferred this issue from apple/swift-issues Apr 25, 2022
This issue was closed.
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 good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

3 participants