[cfe-commits] r107264 - in /cfe/trunk: lib/CodeGen/MicrosoftCXXABI.cpp test/CodeGenCXX/mangle-ms.cpp

Charles Davis cdavis at mymail.mines.edu
Wed Jun 30 18:20:16 PDT 2010


On 6/30/10 6:04 PM, Sean Hunt wrote:
> How does MSVC mangle void foo(int*)? Is it actually different from void
> foo(int * const)?
The first one is mangled '?foo@@YAXPAH at Z', the second '?foo@@YAXQAH at Z'.
So yeah, they're different. Microsoft designed the mangling scheme so
that it is possible to recover the entire C++ declaration (with MS
extensions, of course) from the mangled name. (IIUC, they did this to
enforce the ODR.)

Chip



More information about the cfe-commits mailing list