Jump to content
Sign in to follow this  
Guest Joe

If / Else Causing "general Error"

Recommended Posts

Guest Joe

Recently, been having trouble with if / else combinations written in the form:

if( condition )
  expression;
else                 <--- Fails here
  expression;

 

Sometimes, the compiler fails with a "General Error" (aka Generally not usefull at-all Error message) and fails at the else point.

 

Adding curly-braces appears to fix the problem. C2c v551.

if( condition )
{
  expression;
}
else
{
  expression;
}

 

Can't reporduce this as it appears to be random and fixes its-self when the source is changed.

 

Anyone else seeing this issue?

 

 

Also, every once in a while, i get a General Error when hitting the code:

 

 

x += y;

 

where x and y are both 16-bit.

 

 

re-writing in the form

 

x = x + y;

 

fixes the fault...

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...