Continued from C++ static function

An unused static function can be removed while generating the .o file itself as the static function can’t be called from outside.

During the compilation step, a non-static function means that even if the function is not called from inside the cpp file, it cannot be removed from the generated object file as it can be called from outside.

However, they can be removed by the linker as it has visibility into usage across all compile units.