[cfe-dev] [llvm-dev] problem (and fix) with -fms-extensions
Marc Espie via cfe-dev
cfe-dev at lists.llvm.org
Wed May 17 16:24:39 PDT 2017
On Wed, May 17, 2017 at 03:55:06PM -0700, Reid Kleckner wrote:
>
> On Wed, May 17, 2017 at 3:22 PM, Marc Espie <[1]espie at nerim.net> wrote:
>
> On Wed, May 17, 2017 at 01:01:07PM -0700, Reid Kleckner wrote:
> >
> >Â Â I'd rather not add new pre-defined macros if we can avoid it.
> There are
> >Â Â already too many. You can probably detect this situation
> with:
> >Â Â #if defined(_MSC_EXTENSIONS) && !defined(_WCHAR_T_DEFINED)
> >
> Was this added recently ?
> There is no _MSC_EXTENSIONS in the clang I'm using...
>
> Looks like we only define it for Windows targets.
> How about __is_identifier?
> $ cat t.cpp
> #if !__is_identifier(__wchar_t)
> #error "have __wchar_t"
> #else
> #error "no __wchar_t"
> #endif
Nope, that will trigger errors on non clang compilers.
Why do you fight so hard against a simple solution ?
More information about the cfe-dev
mailing list