diff options
author | bors[bot] <26634292+bors[bot]@users.noreply.github.com> | 2022-12-04 19:14:59 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-12-04 19:14:59 +0000 |
commit | 22329b03a6e0a3381d907745205012cf290b3c2a (patch) | |
tree | f6c9616a3c3ab3c69c5d5be7a020934162fb05e7 /gcc/rust/lex/rust-lex.cc | |
parent | 402118688f56d88d213572ee55a4245eec83b25f (diff) | |
parent | 071e8b001c7834c38dc4db697dd10d26eba67149 (diff) | |
download | gcc-22329b03a6e0a3381d907745205012cf290b3c2a.zip gcc-22329b03a6e0a3381d907745205012cf290b3c2a.tar.gz gcc-22329b03a6e0a3381d907745205012cf290b3c2a.tar.bz2 |
Merge #1676
1676: Fix regressions in 32 bit mode and gcc4.8 builds r=CohenArthur a=philberty
This reverts commit 9657c328d0cdda49b7985c3ee727781a387e128b.
This reverts commit fc59d137491ce393797dfec1d8cd5251a41b5f67.
Co-authored-by: Philip Herron <philip.herron@embecosm.com>
Diffstat (limited to 'gcc/rust/lex/rust-lex.cc')
-rw-r--r-- | gcc/rust/lex/rust-lex.cc | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/gcc/rust/lex/rust-lex.cc b/gcc/rust/lex/rust-lex.cc index ea17ecc..8028c1b 100644 --- a/gcc/rust/lex/rust-lex.cc +++ b/gcc/rust/lex/rust-lex.cc @@ -1364,7 +1364,7 @@ Lexer::parse_escape (char opening_char) /* Parses an escape (or string continue) in a string or character. Supports * unicode escapes. */ std::tuple<Codepoint, int, bool> -Lexer::parse_utf8_escape () +Lexer::parse_utf8_escape (char opening_char) { Codepoint output_char; int additional_length_offset = 0; @@ -1964,7 +1964,7 @@ Lexer::parse_string (Location loc) if (current_char32.value == '\\') { // parse escape - auto utf8_escape_pair = parse_utf8_escape (); + auto utf8_escape_pair = parse_utf8_escape ('\''); current_char32 = std::get<0> (utf8_escape_pair); if (current_char32 == Codepoint (0) && std::get<2> (utf8_escape_pair)) @@ -2365,7 +2365,7 @@ Lexer::parse_char_or_lifetime (Location loc) if (current_char32.value == '\\') { // parse escape - auto utf8_escape_pair = parse_utf8_escape (); + auto utf8_escape_pair = parse_utf8_escape ('\''); current_char32 = std::get<0> (utf8_escape_pair); length += std::get<1> (utf8_escape_pair); |