[llvm-bugs] [Bug 52549] New: [clang-cl] Predefine _MSVC_EXECUTION_CHARACTER_SET to the encoding for narrow string literals

via llvm-bugs llvm-bugs at lists.llvm.org
Thu Nov 18 13:22:00 PST 2021


            Bug ID: 52549
           Summary: [clang-cl] Predefine _MSVC_EXECUTION_CHARACTER_SET to
                    the encoding for narrow string literals
           Product: clang
           Version: unspecified
          Hardware: PC
                OS: Windows NT
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: Frontend
          Assignee: unassignedclangbugs at nondot.org
          Reporter: Casey at Carter.net
                CC: llvm-bugs at lists.llvm.org, neeilans at live.com,
                    richard-llvm at metafoo.co.uk

As of VS 2022 17.1 the MSVC compiler will predefine a macro
`_MSVC_EXECUTION_CHARACTER_SET` to the codepage corresponding to the encoding
used as the ordinary literal encoding (as defined in N4901 [lex.charset]/5).
For example, the value `65001` is used for UTF-8, and `1252` for the default
English Windows-1252 encoding. It would be nice if clang-cl could also
predefine this macro similarly.

If I understand correctly, clang-cl always uses UTF-8 as its ordinary literal
encoding (See PR41536) so this shouldn't be a big ask =)

You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20211118/b3ba348f/attachment.html>

More information about the llvm-bugs mailing list