[PATCH] Allow _MSC_EXTENSIONS macro on non-Windows targets
Robinson, Paul
Paul_Robinson at playstation.sony.com
Wed Mar 12 16:00:04 PDT 2014
> I don't think I understand the problem you are trying to solve.
We provide a header file to our licensees.
That header file declares __wchar_t.
But if the licensee uses -fms-extensions, that causes clang to
predeclare __wchar_t and our declaration causes a compile-time error.
So, we need a way to conditionalize our declaration.
> If you want to determine whether or not MSVC keywords are enabled, I
> don't see why it wouldn't be unreasonable to add a `msvc_keywords`
> argument for `__has_extension`.
If "MSVC keywords" includes "predeclared types" I guess that would work.
--paulr
>
> http://llvm-reviews.chandlerc.com/D3034
More information about the cfe-commits
mailing list