This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Wise compiler.

It tells me that it ignores unused function. Should I use all the functions of a library that I include into my project if I need only one? IMO, if I don't use a function then there is no need neither to use it nor mention about all the functions of the library module. Explain this, please, to Pascal/Java follower.

Parents
  • For a compiler like C51 that performs a static link-time analysis of function call nesting to facilitate overlaying data objects, be aware that uncalled functions are essentially new "roots" in the call tree generated during data overlay analysis. This means that the parameter and auto data allocated to them (assuming a non-reentrant model) will not be overlaid -- that is, permanently occupying otherwise unused RAM. I am assuming that this applies to functions in a library as well as explicitly specified object files.

Reply
  • For a compiler like C51 that performs a static link-time analysis of function call nesting to facilitate overlaying data objects, be aware that uncalled functions are essentially new "roots" in the call tree generated during data overlay analysis. This means that the parameter and auto data allocated to them (assuming a non-reentrant model) will not be overlaid -- that is, permanently occupying otherwise unused RAM. I am assuming that this applies to functions in a library as well as explicitly specified object files.

Children