[cfe-dev] Clang for windows
Hans Wennborg
hans at chromium.org
Fri Aug 22 09:37:48 PDT 2014
On Thu, Aug 21, 2014 at 2:38 PM, Smith, Kevin B <kevin.b.smith at intel.com> wrote:
> I was playing around with CLANG for windows (clang-cl.exe) and noticed that this doesn't support
> _int64, but that it does support __int64. For Microsoft compiler both __int64 and _int64 are recognized
> as a keyword and basic type.
[...]
> $ svn diff
> Index: include/clang/Basic/TokenKinds.def
> ===================================================================
> --- include/clang/Basic/TokenKinds.def (revision 216129)
> +++ include/clang/Basic/TokenKinds.def (working copy)
> @@ -558,6 +558,7 @@
> ALIAS("_uuidof" , __uuidof , KEYMS | KEYBORLAND)
> ALIAS("_inline" , inline , KEYMS)
> ALIAS("_declspec" , __declspec , KEYMS)
> +ALIAS("_int64" , __int64 , KEYMS)
>
> // Borland Extensions which should be disabled in strict conformance mode.
> ALIAS("_pascal" , __pascal , KEYBORLAND)
Thank you for the patch! Yes, this looks like the right approach. We
should do the same for _int8, _int16 and _int32. Like Richard pointed
out, this needs a test (test/Lexer/ms-extensions.c is probably a good
place). Would you like to add this to your patch, and then we can
commit it for you?
(David pointed out that the single-underscore variants of these types
aren't available in MSVC with /Za, so maybe one day we should consider
not exposing them with -fms-extensions by default.)
Thanks,
Hans
More information about the cfe-dev
mailing list