The return type of the function is not part of mangling. Return types are applied by the compiler directly based on type rules.
You can call a function defined as, for example, returning int , and with a declaration for returning, for example, char . Most tools will not notice inconsistencies. Considering everything they do, you can shoot in the foot, itβs not so bad as you have to go out of your way to do this. For example, without using a header file common to both modules.
source share