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.

> By the way, I just realized: the behavior of __int8 in clang is wrong
> currently. It should always be signed (unless specified otherwise with
> 'unsigned'), whereas right now it can be signed or unsigned depending on
> the -funsigned-char parameter, since it's an alias to 'char'.

Good catch!

John.
_______________________________________________
cfe-commits mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits

Reply via email to