aboutsummaryrefslogtreecommitdiff
path: root/gcc/rust/backend/rust-compile-fnparam.h
diff options
context:
space:
mode:
authorMark Wielaard <mark@klomp.org>2021-10-02 22:50:52 +0200
committerMark Wielaard <mark@klomp.org>2021-10-02 23:03:54 +0200
commit23475a8131d2bd284758bcab85fa1c5bb98f1010 (patch)
tree49aa28db4ebc157b521ea49547de2a5b21ec6af5 /gcc/rust/backend/rust-compile-fnparam.h
parentfdcad086e134b889ba542fadc1150bb2fcef8aea (diff)
downloadgcc-23475a8131d2bd284758bcab85fa1c5bb98f1010.zip
gcc-23475a8131d2bd284758bcab85fa1c5bb98f1010.tar.gz
gcc-23475a8131d2bd284758bcab85fa1c5bb98f1010.tar.bz2
Fix lexer to not produce bad unicode escape values
There were a couple of issues in the lexer unicode escape code. Unicode escape sequences must always start with an opening curly bracket (and end with a closing one). Underscores are not allowed as starting character. And the produced values must be unicode scalar values, which excludes surrogate values (D800 to DFFF) or values larger than 10FFFF. Also try to recover more gracefully from errors by trying to skip past any bad characters to the end of the escape sequence. Test all of the above in a new testcase unicode_escape.rs.
Diffstat (limited to 'gcc/rust/backend/rust-compile-fnparam.h')
0 files changed, 0 insertions, 0 deletions