Steven Bosscher wrote:
Isn't this what you describe here the same as COMDAT?
Well, MS VC have an option "enable COMDAT folding" - which turns ON merging of identical functions. BTW, this is linker option... should it be addressed to GCC's LTO?
I'm not sure if function body is equivalent to "COMDAT".