[cfe-commits] r130369 - in /cfe/trunk: include/clang/Basic/TokenKinds.def lib/Frontend/InitPreprocessor.cpp lib/Parse/ParseDecl.cpp lib/Parse/ParseExpr.cpp lib/Parse/ParseExprCXX.cpp lib/Parse/ParseTentative.cpp test/Parser/MicrosoftExtensions.cpp test/Preprocessor/init.c

Charles Davis cdavis at mymail.mines.edu
Fri Apr 29 08:51:40 PDT 2011


On 4/28/11 9:31 AM, John McCall wrote:
> 
> On Apr 27, 2011, at 10:15 PM, Charles Davis wrote:
> 
>> On 4/27/11 10:33 PM, John McCall wrote:
>>> Well, I think we already figured out that the MS mangler has to work with non-canonical types sometimes;  this would just involve looking for particular TypedefTypes.
>>>
>>> But the first thing to figure out is whether they're different types.  Judging from these changes they're built into the compiler somehow, so we need to check this programmatically, e.g., by whether this compiles or not:
>>>
>>> template <class A, class B> struct is_same {
>>>  enum { value = -1 };
>>> };
>>> template <class A> struct is_same<A,B> {
>>>  enum { value = 1 };
>>> };
>>> char myarray[is_same<__int16, short>::value];
>>
>> This compiles successfully with Visual C++ 8, so it looks like they
>> really aren't different types.
> 
> Okay, thanks.
Not only that, but they aren't even mangled differently anymore. (The
only one that's mangled specially is __int64, and that's because it
predates 'long long' support.)

Chip




More information about the cfe-commits mailing list