__declspec(do_not_merge)

Specifies that a function must not be removed from object code during code merging optimization.

Syntax
__declspec(do_not_merge) 
  function-declaration ;
  
Remarks

When you declare or define a function with this declaration specification the linker does not consider this function when applying the code merging optimization. This declaration specification ensures that the linker will not remove a function from object code during code merging if another function with identical object code exists.

Use this declaration specification for functions that your program refers to with function pointers.