aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorJonathan Wakely <jwakely@redhat.com>2022-03-11 14:52:38 +0000
committerJonathan Wakely <jwakely@redhat.com>2022-03-14 13:08:02 +0000
commit8f7b7c1495f92c72da154d32317943a2cc276ca8 (patch)
treee137f7fadc371339cd5e06afae5a63fb8e9213a1 /gcc
parent67a1cb2ad16ff9ff5a7dc4532d0e0fe98be42382 (diff)
downloadgcc-8f7b7c1495f92c72da154d32317943a2cc276ca8.zip
gcc-8f7b7c1495f92c72da154d32317943a2cc276ca8.tar.gz
gcc-8f7b7c1495f92c72da154d32317943a2cc276ca8.tar.bz2
libstdc++: Fix reading UTF-8 characters for 16-bit targets [PR104875]
The current code in read_utf8_code_point assumes that integer promotion will create a 32-bit int, but that's not true for 16-bit targets like msp430 and avr. This changes the intermediate variables used for each octet from unsigned char to char32_t, so that (c << N) works correctly when N > 8. libstdc++-v3/ChangeLog: PR libstdc++/104875 * src/c++11/codecvt.cc (read_utf8_code_point): Use char32_t to hold octets that will be left-shifted.
Diffstat (limited to 'gcc')
0 files changed, 0 insertions, 0 deletions