 <p>This is a by-product of what Visual C++ refers to as <strong>Identical COMDAT Folding</strong> (ICF). It merges identical functions into a single instance. You can disable it by adding the following switch to the linker commandline: <code>/OPT:NOICF</code> (from the Visual Studio UI it is found under <em>Properties->Linker->Optimization->Enable COMDAT Folding</em>)</p> <p>You can find details at the MSDN article here: <a href="http://msdn.microsoft.com/en-us/library/bxwfs976%28v=vs.110%29.aspx">/OPT (Optimizations)</a></p> <p>The switch is a linker-stage switch, which means you won't be able to enable it just for a specific module or a specific region of code (such as <code>__pragma( optimize() )</code> which is available for compiler-stage optimization).</p> <p>In general, however, it is considered poor practice to rely on either function pointers or literal string pointers (<code>const char*</code>) for testing uniqueness. String folding is widely implemented by almost all C/C++ compilers. Function folding is only available on Visual C++ at this time, though increased widespread use of template&lt;> meta-programming has increased requests for this feature to be added to gcc and clang toolchains.</p> <p>Edit: Starting with binutils 2.19, the included gold linker supposedly also supports ICF, though I have been unable to verify it on my local Ubuntu 12.10 install.</p>