Jump to content
Sign in to follow this  
tobik

Switch: Empty Case Before Default

Recommended Posts

Bug description:

Empty case before default in switch

-> boostc 1.1 (5.6.1): error: missing right brace

-> c2c 5.6.1e: error: label_43 not found

 

Steps to reproduce:

boostc

char bla = 0;
switch (bla)
{
  case 0:
    ;
  default
     bla = 1;
}

 

C2C

char bla = 0;
switch (bla)
{
  case 0:
  default
     bla = 1;
}

 

Expected behaviour:

Compiler should accept this code even it is not very substantial :-)

 

Reproduceable:

always

 

SourceBoost DE version: 5.6.1

Compiler: C2C 5.6.1e, BoostC 1.1 Alpha

Share this post


Link to post
Share on other sites

The source code from your sample contains an error. It misses semicolon after 'default'.

 

Regards,

Pavel

Share this post


Link to post
Share on other sites

Join the conversation

You are posting as a guest. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
Sign in to follow this  

×
×
  • Create New...