r216270 - -fms-extensions: Alias _intNN to __intNN
Reid Kleckner
reid at kleckner.net
Fri Aug 22 09:52:57 PDT 2014
Author: rnk
Date: Fri Aug 22 11:52:57 2014
New Revision: 216270
URL: http://llvm.org/viewvc/llvm-project?rev=216270&view=rev
Log:
-fms-extensions: Alias _intNN to __intNN
Fixes build for SPEC 2000 CPU. MSVC disables these aliases under /Za,
which enables stricter standards compliance. We don't currently have any
way to disable them.
Patch by Kevin Smith!
Modified:
cfe/trunk/include/clang/Basic/TokenKinds.def
cfe/trunk/test/Parser/MicrosoftExtensions.cpp
Modified: cfe/trunk/include/clang/Basic/TokenKinds.def
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Basic/TokenKinds.def?rev=216270&r1=216269&r2=216270&view=diff
==============================================================================
--- cfe/trunk/include/clang/Basic/TokenKinds.def (original)
+++ cfe/trunk/include/clang/Basic/TokenKinds.def Fri Aug 22 11:52:57 2014
@@ -545,8 +545,12 @@ KEYWORD(__multiple_inheritance ,
KEYWORD(__virtual_inheritance , KEYMS)
KEYWORD(__interface , KEYMS)
ALIAS("__int8" , char , KEYMS)
+ALIAS("_int8" , char , KEYMS)
ALIAS("__int16" , short , KEYMS)
+ALIAS("_int16" , short , KEYMS)
ALIAS("__int32" , int , KEYMS)
+ALIAS("_int32" , int , KEYMS)
+ALIAS("_int64" , __int64 , KEYMS)
ALIAS("__wchar_t" , wchar_t , KEYMS)
ALIAS("_asm" , asm , KEYMS)
ALIAS("_alignof" , __alignof , KEYMS)
Modified: cfe/trunk/test/Parser/MicrosoftExtensions.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Parser/MicrosoftExtensions.cpp?rev=216270&r1=216269&r2=216270&view=diff
==============================================================================
--- cfe/trunk/test/Parser/MicrosoftExtensions.cpp (original)
+++ cfe/trunk/test/Parser/MicrosoftExtensions.cpp Fri Aug 22 11:52:57 2014
@@ -226,6 +226,11 @@ void interface_test() {
}
__int64 x7 = __int64(0);
+_int64 x8 = _int64(0);
+static_assert(sizeof(_int64) == 8, "");
+static_assert(sizeof(_int32) == 4, "");
+static_assert(sizeof(_int16) == 2, "");
+static_assert(sizeof(_int8) == 1, "");
int __identifier(generic) = 3;
int __identifier(int) = 4;
More information about the cfe-commits
mailing list