Skip to content

Conversation

@crudeboy776
Copy link

This fixes a build failure with GCC/Clang where declarations directly after a case label are not valid in C.

Repro (Debian 11, GCC): make convert fails with:
error: a label can only be part of a statement and a declaration is not a statement

Also reproducible with clang on macOS.

Fix: wrap the 'p' case body in braces so the declarations are within a block scope.
Tested: make convert.

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.

1 participant