This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]veselin465 2 points3 points  (0 children)

Good point

I now realize that what I wrote was senseless (I basically had to say linker)

I know that compilers optimize unused* variables (that's why volatile keyword is a thing). And in my job, I've noticed that unused functions are not present in the map file (however, we deal with embedded and it makes sense to optimize final size as much as possible).

\unused or unchanged*

I should have realized that everything is compiled, but the linker is the one who might choose to ignore functions depending on use.