Fix off-by-one bug in utf16 conversion (PR preprocessor/41698).
authorJoseph Myers <jsm28@gcc.gnu.org>
Sat, 29 Nov 2014 01:56:06 +0000 (01:56 +0000)
committerJoseph Myers <jsm28@gcc.gnu.org>
Sat, 29 Nov 2014 01:56:06 +0000 (01:56 +0000)
commit81fee4a708e49a075602b0b4f89793ad9ed22f01
treef7a6e9485e2f70feb13e54ed3074413bd5504a92
parentbfa52c5720829e6eb6f5d4e9f8889e0154e48c13
Fix off-by-one bug in utf16 conversion (PR preprocessor/41698).

libcpp:
2014-11-29  John Schmerge  <jbschmerge@gmail.com>

PR preprocessor/41698
* charset.c (one_utf8_to_utf16): Do not produce surrogate pairs
for 0xffff.

gcc/testsuite:
2014-11-29  Joseph Myers  <joseph@codesourcery.com>

PR preprocessor/41698
* gcc/testsuite/g++.dg/cpp/utf16-pr41698-1.C: New test.

From-SVN: r218179
gcc/testsuite/ChangeLog
gcc/testsuite/g++.dg/cpp/utf16-pr41698-1.C [new file with mode: 0644]
libcpp/ChangeLog
libcpp/charset.c