diff options
author | bors[bot] <26634292+bors[bot]@users.noreply.github.com> | 2022-06-17 06:39:03 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-06-17 06:39:03 +0000 |
commit | d4a0780073bfaf96d72427d5138b74ef257ed625 (patch) | |
tree | 6aeab1fc00657b83bb17c94e3317fcaf9aa7c88f /gcc/rust/lex/rust-lex.cc | |
parent | 08e407e977e78bfebb2faa71be377c58369b8b0d (diff) | |
parent | 29f57496698d2098d48b9fff7807f22dadc10e6b (diff) | |
download | gcc-d4a0780073bfaf96d72427d5138b74ef257ed625.zip gcc-d4a0780073bfaf96d72427d5138b74ef257ed625.tar.gz gcc-d4a0780073bfaf96d72427d5138b74ef257ed625.tar.bz2 |
Merge #1308
1308: Fix formatting error on 32-bits targets r=CohenArthur a=dkm
Printing size_t as [unsigned] long (%ld or %lu) raises warnings on 32-bits
targets. As the GCC pretty printer doesn't have the equivalent of libc's %z/%zu,
fix all formats to use unsigned long and cast values.
refs #1229
Signed-off-by: Marc Poulhiès <dkm@kataplop.net>
Co-authored-by: Rainer Orth <ro@gcc.gnu.org>
Co-authored-by: Marc Poulhiès <dkm@kataplop.net>
Diffstat (limited to 'gcc/rust/lex/rust-lex.cc')
-rw-r--r-- | gcc/rust/lex/rust-lex.cc | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/gcc/rust/lex/rust-lex.cc b/gcc/rust/lex/rust-lex.cc index 9e0595b..13921e7 100644 --- a/gcc/rust/lex/rust-lex.cc +++ b/gcc/rust/lex/rust-lex.cc @@ -1573,7 +1573,7 @@ Lexer::parse_partial_unicode_escape () rust_error_at (get_current_location (), "unicode escape should be between 1 and 6 hex " "characters; it is %lu", - num_str.length ()); + (unsigned long) num_str.length ()); // return false; return std::make_pair (Codepoint (0), additional_length_offset); } |