Jump to content
Sign in to follow this  
don_erickson

Bug Reports

Recommended Posts

Using Sourceboost 5.6.1

" boostc 1.5

Windows Me

 

I have a program which compiles successfully with Boostc 1.5.

When I have it Build, the linker comes into play, and reports that it has omitted four of my functions. When I look at the code window, I see that either the compiler left out about 30 - 35 lines of my source code, or the linker saw fit to

ignore it. As a result, four of my functions are never called.

 

These 30 to 35 lines are not commented out -- just ignored by either the compiler or the linker.

 

How can I tell which, and better yet, how do I tell what is going on?

I had this program running partially with C2C-plus, but it won't even initialize the LCD when I use Boostc.

 

Thanks

Don Erickson

Share this post


Link to post
Share on other sites
I have a program which compiles successfully with Boostc 1.5.

When I have it Build, the linker comes into play, and reports that it has omitted four of my functions.  When I look at the code window, I see that either the compiler left out about 30 - 35 lines of my source code, or the linker saw fit to

ignore it.  As a result, four of my functions are never called.

 

These 30 to 35 lines are not commented out -- just ignored by either the compiler or the linker.

 

How can I tell which, and better yet, how do I tell what is going on?

I had this program running partially with C2C-plus, but it won't even initialize the LCD when I use Boostc.

 

That's probably linker who optimizes out 'dead' code or code that is never executed. If you think that linker optimizes out code that it should not please send me your zipped project so we can check it.

 

Regards,

Pavel

Share this post


Link to post
Share on other sites

There are many 'if' expressions in the code that are never executed and are optimized out by compiler (Don kindly provided his project sources). For example:

 

if (portb, CHG == 0) ...

 

In this expression CHG was earlier defined as '2' (expression 'portb' doesn't produce any code and expression '2 == 0' is always 'false'). The result of this expression is always 'false' and compiler optimizes out the 'if' body.

 

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