[PATCH] D87962: [clang] Change the multi-character character constants from extension to implementation-defined.

Chuyang Chen via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Oct 1 01:13:48 PDT 2020


nomanous added a comment.

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

> Multichar literals are implementation-defined in C and conditionally supported with implementation-defined semantics in C++. I agree that it may make sense to warn about their use for portability reasons, but I'm not certain whether it makes sense to promote their use to be always-on diagnostics. I'm curious to know if this change causes any issues with system headers (which may or may not still define four char codes) or popular libraries.
>
> I was curious as to why this was an extension in the first place and found the original commits (https://github.com/llvm/llvm-project/commit/74c95e20af4838152a63010292d1063835176711 and https://github.com/llvm/llvm-project/commit/8577f62622d50183c7413d7507ec783d3c1486fc) but there's no justification as to why this was picked as an extension.

Or should we change the four character case to "Remark" so it wouldn't be warned even with the "-pandemic" option? There seems no other choice.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D87962



More information about the cfe-commits mailing list