[PATCH] D106577: [clang] Define __STDC_ISO_10646__

Hubert Tong via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Jul 22 19:58:43 PDT 2021


hubert.reinterpretcast added a comment.

In D106577#2897588 <https://reviews.llvm.org/D106577#2897588>, @aaron.ballman wrote:

> In D106577#2897522 <https://reviews.llvm.org/D106577#2897522>, @jyknight wrote:
>
>> I'm not sure we should be populating this.
>>
>> The _value_ is determined by what libc supports, so it probably needs to be left up to libc to define it.
>
> Why is the value determined by what libc supports? The definition from the standard is:
>
>   If this symbol is defined, then every character in the Unicode required set, when stored in an
>   object of type wchar_t, has the same value as the short identifier of that character.
>
> That doesn't seem to imply anything about the library, just the size of `wchar_t`.

Every character in the Unicode required set encoded in what way? To say that such a character is stored in an object of type `wchar_t` means that interpreting the `wchar_t` yields that stored character. Methods to determining the interpretation of the stored `wchar_t` value include locale-sensitive functions such as `wcstombs` (and thus is tied to libc).


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D106577/new/

https://reviews.llvm.org/D106577



More information about the cfe-commits mailing list