<html>
<head>
<base href="http://llvm.org/bugs/" />
</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 --- - Characters not in the basic character set aren't converted to \uXXXX form correctly"
href="http://llvm.org/bugs/show_bug.cgi?id=22067">22067</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>Characters not in the basic character set aren't converted to \uXXXX form correctly
</td>
</tr>
<tr>
<th>Product</th>
<td>clang
</td>
</tr>
<tr>
<th>Version</th>
<td>unspecified
</td>
</tr>
<tr>
<th>Hardware</th>
<td>PC
</td>
</tr>
<tr>
<th>OS</th>
<td>All
</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++11
</td>
</tr>
<tr>
<th>Assignee</th>
<td>unassignedclangbugs@nondot.org
</td>
</tr>
<tr>
<th>Reporter</th>
<td>nicolasweber@gmx.de
</td>
</tr>
<tr>
<th>CC</th>
<td>dgregor@apple.com, llvmbugs@cs.uiuc.edu
</td>
</tr>
<tr>
<th>Classification</th>
<td>Unclassified
</td>
</tr></table>
<p>
<div>
<pre>Consider
#include <stdio.h>
#define RAW(x) R##x
const char c[] = RAW("(ü\n)");
int main() {
puts(c);
}
$ bin/clang -o foo test2.cc -isysroot $(xcrun -show-sdk-path) -std=c++11
$ ./foo
ü\n
[lex.phases] says
"""
Any source file character not in the basic
source character set (2.3) is replaced by the universal-character-name that
designates that character.
"""
[lex.pptoken]p3 says that
"""
If the input stream has been parsed into preprocessing tokens up to a given
character:
— If the next character begins a sequence of characters that could be the
prefix and initial double quote of
a raw string literal, such as R", the next preprocessing token shall be a raw
string literal. Between the
initial and final double quote characters of the raw string, any
transformations performed in phases 1
and 2 (trigraphs, universal-character-names, and line splicing) are reverted;
"""
In
<a href="http://stackoverflow.com/questions/6855149/are-trigraph-substitutions-reverted-when-a-raw-string-is-created-through-concate">http://stackoverflow.com/questions/6855149/are-trigraph-substitutions-reverted-when-a-raw-string-is-created-through-concate</a>,
Richard explains that the pp tokens here prevent the raw string token reversion
of phases 1 and 2, so shouldn't the output be
\u00fc\n
instead?</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>