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

Fix build error from case labeled declaration #67

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

Uks2
Copy link
Contributor

@Uks2 Uks2 commented Jul 30, 2022

This is maybe a gcc vs clang thing?

@ghost
Copy link

ghost commented Jul 30, 2022

Seems like i’m too careless with these 😇

More to the point, this is usually ‘fixed’ by adding a semicolon immediately after the colon, like case whatevs:;.

@Uks2
Copy link
Contributor Author

Uks2 commented Jul 30, 2022

I usually wrap each of my cases in braces: case whatevs: { int i = 1; some_function( i ); break; } .... Has the advantange of making variable scopes a bit more intuitive, plus vim folds them nicely. But it seemed weird to do that only once in the entire code base.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant