[PATCH] D127363: [Lex] Fix for char32_t literal truncation on 16 bit architectures

Aaron Ballman via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Jun 9 07:22:10 PDT 2022


aaron.ballman added a reviewer: tahonermann.
aaron.ballman added a subscriber: tahonermann.
aaron.ballman added a comment.

> On 16 bit architectures char32_t literals are truncated, for example U'\U00064321' will be truncated to 0x4321.

Is that valid?

https://eel.is/c++draft/basic.types#basic.fundamental-9.sentence-2 and also C2x 7.29p2 (which has the same underlying type requirement) both say that the underlying type for `char32_t` is `uint_least32_t`. Adding @tahonermann to verify.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D127363



More information about the cfe-commits mailing list