Adds multibyte awareness to pretty-print.c
authorLewis Hyatt <lhyatt@gmail.com>
Wed, 11 Dec 2019 14:52:31 +0000 (14:52 +0000)
committerLewis Hyatt <lhyatt@gcc.gnu.org>
Wed, 11 Dec 2019 14:52:31 +0000 (14:52 +0000)
commitddd0fd173a12111f9cb6747d7714b976f870c70b
tree8d32b41f3680899710d7acc75390cb28dd9cf351
parent0dc4e690ce92e2ee4e97ab430d6fb063dd3f4a22
Adds multibyte awareness to pretty-print.c

2019-12-11  Lewis Hyatt  <lhyatt@gmail.com>

PR 91853
* pretty-print.c (pp_quoted_string): Avoid hex-escaping valid
multibyte input.  Fix off-by-one-bug printing the last byte before a
hex-escaped output.
(pp_character): Don't apply line wrapping in the middle of multibyte
characters.
(test_utf8): New test.
(pretty_print_c_tests): Call the new test.

From-SVN: r279226
gcc/ChangeLog
gcc/pretty-print.c