[Patch] Add C11 uchar/wchar related __STDC_* definitions

Richard Smith richard at metafoo.co.uk
Sun May 26 15:12:40 PDT 2013


Is this change correct when targeting Windows?

On Sun, May 26, 2013 at 3:52 AM, Ed Schouten <ed at 80386.nl> wrote:

> Hi Dmitri,
>
> 2013/5/25 Dmitri Gribenko <gribozavr at gmail.com>:
> > Please add tests.  (Tests for these macros should probably go into
> > test/Preprocessor/init.c).
>
> Added! (Please refresh)
>
> http://80386.nl/pub/clang-c11-uchar.txt
>
> > Should this be conditional on C11 or C++11?
>
> Though these definitions are only part of C11/C++11, I think it would
> be safer to just define them unconditionally. For example, a piece of
> code assumes C11, but is not built with -std=c11, it may wrongly
> assume !defined(__STDC_MB_MIGHT_NEQ_WC__), which could have disastrous
> side-effects.
>
> --
> Ed Schouten <ed at 80386.nl>
> _______________________________________________
> cfe-commits mailing list
> cfe-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20130526/b0504637/attachment.html>


More information about the cfe-commits mailing list