-
-
Notifications
You must be signed in to change notification settings - Fork 610
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
fix Issue 23143 - ImportC: forward enum declarations need to be suppo… #14277
Conversation
|
Thanks for your pull request, @WalterBright! Bugzilla references
Testing this PR locallyIf you don't have a local development environment setup, you can use Digger to test this PR: dub run digger -- build "master + dmd#14277" |
352c52a to
42a7505
Compare
|
What broke this? |
|
@WalterBright : As disscussed yesterday, we're in the process of merging druntime into DMD. The CI will be 100% broken until #14281 is merged. |
|
Why does every file need extensive rebasing? |
They don't, or you are over thinking it. |
src/dmd/cparse.d
Outdated
| @@ -1675,7 +1675,7 @@ final class CParser(AST) : Parser!AST | |||
| auto stags = applySpecifier(stag, specifier); | |||
| symbols.push(stags); | |||
|
|
|||
| if (tt.tok == TOK.enum_) | |||
| if (0 && tt.tok == TOK.enum_) // C11 proscribes enums with no members, but we allow it | |||
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.
?
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.
ISO C forbids forward references to enum types, I guess we're picking and choosing what parts of the spec we're going to enforce now?
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.
I wanted to leave it in in case we want to be strict C11.
|
@ibuclaw thank you. But what are the commands if I'm already sitting on walterbright fix23143 because I'm afraid to update to master as it will wipe out my repository? |
Just fetch and rebase on master. It won't wipe out your repository. If you are really paranoid, you can always make a copy of your directory before making any changes. However, git keeps a reference to all state changes in its reflog, so you can always pull up your current changes with |
|
@ibuclaw that worked! Thanks for your help. |
…rted
Most of the machinery was already in place, thanks to struct and union tags. Only problem was EnumMembers had a back reference to the EnumDeclaration that had to be adjusted.