[cfe-dev] [llvm-dev] problem (and fix) with -fms-extensions
Richard Smith via cfe-dev
cfe-dev at lists.llvm.org
Wed May 17 17:31:45 PDT 2017
On 17 May 2017 at 16:24, Marc Espie via cfe-dev <cfe-dev at lists.llvm.org>
wrote:
> 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.
>
You can wrap it in #ifdef __clang__ to fix that.
> Why do you fight so hard against a simple solution ?
> _______________________________________________
> cfe-dev mailing list
> cfe-dev at lists.llvm.org
> http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20170517/1014bc47/attachment.html>
More information about the cfe-dev
mailing list