[llvm-bugs] [Bug 36267] New: Less than ideal handling of variable names in Cyrillic alphabet
via llvm-bugs
llvm-bugs at lists.llvm.org
Wed Feb 7 05:43:43 PST 2018
https://bugs.llvm.org/show_bug.cgi?id=36267
Bug ID: 36267
Summary: Less than ideal handling of variable names in Cyrillic
alphabet
Product: clang
Version: trunk
Hardware: PC
OS: Windows XP
Status: NEW
Severity: normal
Priority: P
Component: C++
Assignee: unassignedclangbugs at nondot.org
Reporter: lminkovsky at outlook.com
CC: dgregor at apple.com, llvm-bugs at lists.llvm.org
The following example has a variable name in Russian:
int main() {
int переменная=1;
static_assert(переменная,"");
}
Wandbox.org compiles it with a correct error message:
prog.cc:3:16: error: static_assert expression is not an integral constant
expression
static_assert(переменная,"");
^~~~~~~~~~
prog.cc:3:16: note: read of non-const variable 'переменная' is not allowed in a
constant expression
prog.cc:2:6: note: declared here
int переменная=1;
^
On Windows however, that message looks as follows:
test.cpp(3,16): error: static_assert expression is not an integral constant
expression
static_assert(<U+043F><U+0435><U+0440><U+0435><U+043C><U+0435><U+043D><U+043D><U+0430><U+044F>,"");
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
test.cpp(3,16): note: read of non-const variable 'переменная' is not
allowed in a constant expression
test.cpp(2,6): note: declared here
int
<U+043F><U+0435><U+0440><U+0435><U+043C><U+0435><U+043D><U+043D><U+0430><U+044F>=1;
^
This happens because the Windows console needs to be set to the UTF-8 code page
to properly show Cyrillic characters.
--
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/20180207/f7a76418/attachment.html>
More information about the llvm-bugs
mailing list