[Patch] libc++: Add a default rune table
Marshall Clow
mclow.lists at gmail.com
Wed Dec 17 19:41:16 PST 2014
> On Dec 11, 2014, at 8:22 AM, Ed Schouten <ed at 80386.nl> wrote:
>
> 2014-12-11 15:17 GMT+01:00 Joerg Sonnenberger <joerg at britannica.bec.de>:
>> Sane system use the same logic for the default C locale and the
>> non-default locales, just with a different table.
>
> Sane systems also tend to evolve over time. The snippet of code that
> we use for FreeBSD, for example, will not work on a system from before
> November 2011. Who knows what Microsoft is going to do with MSVCRT.DLL
> in the future?
>
> That said, I am not the maintainer of libc++. Feel free to make any
> modifications to the proposed patch before committing.
I’ve been discussing this with Dan on IRC.
I am quite happy to add a default rune table to libc++ (conditionally included) and to use it on systems that lack (or have defective) tables of their own.
I am less enthusiastic about libc++ always providing its’ own - at this time. I’m worried about compatibility issues.
My proposal:
1) Put it in, use it for Ed’s system (whatever that is :-)) and for Android.
[ With some more static assertions to make sure that the size of the entries is big enough for the data type that’s stored there. ]
2) When that’s working, we can see about using it for other systems.
— Marshall
P.S. I wrote a program that compares the “system table” and the one that Ed put together.
The source for this program is here:
https://dl.dropboxusercontent.com/u/11048326/ctable.cpp <https://dl.dropboxusercontent.com/u/11048326/ctable.cpp>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20141217/c46d10d2/attachment.html>
More information about the cfe-commits
mailing list