[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

John McCall rjmccall at apple.com
Thu Apr 28 08:31:17 PDT 2011


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.



More information about the cfe-commits mailing list