<html>
<head>
<base href="https://bugs.llvm.org/">
</head>
<body><table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Bug ID</th>
<td><a class="bz_bug_link
bz_status_NEW "
title="NEW - Less than ideal handling of variable names in Cyrillic alphabet"
href="https://bugs.llvm.org/show_bug.cgi?id=36267">36267</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>Less than ideal handling of variable names in Cyrillic alphabet
</td>
</tr>
<tr>
<th>Product</th>
<td>clang
</td>
</tr>
<tr>
<th>Version</th>
<td>trunk
</td>
</tr>
<tr>
<th>Hardware</th>
<td>PC
</td>
</tr>
<tr>
<th>OS</th>
<td>Windows XP
</td>
</tr>
<tr>
<th>Status</th>
<td>NEW
</td>
</tr>
<tr>
<th>Severity</th>
<td>normal
</td>
</tr>
<tr>
<th>Priority</th>
<td>P
</td>
</tr>
<tr>
<th>Component</th>
<td>C++
</td>
</tr>
<tr>
<th>Assignee</th>
<td>unassignedclangbugs@nondot.org
</td>
</tr>
<tr>
<th>Reporter</th>
<td>lminkovsky@outlook.com
</td>
</tr>
<tr>
<th>CC</th>
<td>dgregor@apple.com, llvm-bugs@lists.llvm.org
</td>
</tr></table>
<p>
<div>
<pre>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.</pre>
</div>
</p>
<hr>
<span>You are receiving this mail because:</span>
<ul>
<li>You are on the CC list for the bug.</li>
</ul>
</body>
</html>