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

Sean Hunt rideau3 at gmail.com
Wed Jun 30 17:04:21 PDT 2010

On 06/30/2010 05:42 PM, Douglas Gregor wrote:
> On Jun 30, 2010, at 4:37 PM, Charles Davis wrote:
>> Hard to tell; apparently, MSVC allows both of these:
>> void (*pfoo)(int * const) =&foo;
>> void (*pfoo2)(int *) =&foo;
>> These work too:
>> void bar(int);
>> void (*pbar)(int) =&bar;
>> void (*pbar2)(const int) =&bar;
>> My guess is that MSVC's semantic analyzer doesn't consider qualifiers on
>> types in parameters, but it preserves this information for the name mangler.
> Ah, that's correct behavior: cv-qualifiers on parameters are deleted. It really feels like you'll be stuck looking at the TypeSourceInfo for a function type to determine whether it was originally declared as an array :(
> 	- Doug

(sorry Doug, I sent this directly to you, I meant it for the list)

How does MSVC mangle void foo(int*)? Is it actually different from void
foo(int * const)?


More information about the cfe-commits mailing list