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

Internal error: missing statement list on switch statement #31

Open
derrell opened this issue Oct 13, 2014 · 2 comments
Open

Internal error: missing statement list on switch statement #31

derrell opened this issue Oct 13, 2014 · 2 comments
Labels

Comments

@derrell
Copy link
Owner

derrell commented Oct 13, 2014

Notice the missing braces enclosing the cases of the switch statement:

int main(int argc, char * argv[])
{
    switch(x)
    case 0:
        break;
   return 0;
}
@derrell derrell added the bug label Oct 13, 2014
@ebertmi
Copy link

ebertmi commented Oct 14, 2014

Maybe also an interesting snippet for you:

int counter = 244;
/* counter will get its value here somewhere */
switch (counter)
    default:
        while (0 < counter)
        {
            case 0:
                /* Perform action */
                counter--;
        }

@derrell
Copy link
Owner Author

derrell commented Oct 14, 2014

Yes, it seems that if the switch without braces contains default: then the error is properly reported, but if it contains case 0: then an internal error is generated. Thanks!

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

No branches or pull requests

2 participants