Quantcast
Viewing all articles
Browse latest Browse all 36216

Re: namespace vs. assembly

C++ identifiers are "mangled" according to the compiler's internal name mangling rules when generating assembly for them. For example, a variable 'foo' in namespace 'bar' would turn into '_foo__3bar'. You can find a variable's mangled name by looking at the assembly code the compiler generates for it (in a .s file), which the compiler can be told not to delete by using the '-save-temps' option on the command line or the 'Save temporary files' option on the Compile/General page of the project options in the IDE.

Image may be NSFW.
Clik here to view.

Viewing all articles
Browse latest Browse all 36216

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>