public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug rust/105913] New: gccrs doesn't compile on 32-bit targets
@ 2022-06-10 11:22 ro at gcc dot gnu.org
  2022-06-10 11:34 ` [Bug rust/105913] " ro at gcc dot gnu.org
                   ` (9 more replies)
  0 siblings, 10 replies; 11+ messages in thread
From: ro at gcc dot gnu.org @ 2022-06-10 11:22 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105913

            Bug ID: 105913
           Summary: gccrs doesn't compile on 32-bit targets
           Product: gcc
           Version: 13.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: rust
          Assignee: unassigned at gcc dot gnu.org
          Reporter: ro at gcc dot gnu.org
  Target Milestone: ---
            Target: i386-pc-solaris2.11, i686-pc-linux-gnu

Created attachment 53115
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=53115&action=edit
hacky patch

I recently tried bootstrapping the devel/rust/master branch as of
9d81164aa0447c738fe0435de14ec9666a03d5da
on Solaris/x86 and Linux/i686, but unlike Linux/x86_64 the build failed for
several instances of the same issue:

/vol/gcc/src/git/rust/gcc/rust/lex/rust-lex.cc: In member function
'std::pair<Rust::Codepoint, int> Rust::Lexer::parse_partial_unicode_escape()':
/vol/gcc/src/git/rust/gcc/rust/lex/rust-lex.cc:1574:43: error: format '%lu'
expects argument of type 'long unsigned int', but argument 3 has type
'std::__cxx11::basic_string<char>::size_type' {aka 'unsigned int'}
[-Werror=format=]
 1574 |                      "characters; it is %lu",
      |                                         ~~^
      |                                           |
      |                                           long unsigned int
      |                                         %u
 1575 |                      num_str.length ());
      |                      ~~~~~~~~~~~~~~~~~
      |                                     |
      |                                    
std::__cxx11::basic_string<char>::size_type {aka unsigned int}

It's always trying to print size_t (unsigned int) with a %ld or %lu format.

The attached hacky patch casts the arguments accordingly, and allows the
bootstrap
to finish and the testsuite (both 32 and 64-bit) to run successfully.

^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2022-06-29  7:10 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-06-10 11:22 [Bug rust/105913] New: gccrs doesn't compile on 32-bit targets ro at gcc dot gnu.org
2022-06-10 11:34 ` [Bug rust/105913] " ro at gcc dot gnu.org
2022-06-10 12:30 ` tschwinge at gcc dot gnu.org
2022-06-14  7:55 ` tschwinge at gcc dot gnu.org
2022-06-21 10:35 ` tschwinge at gcc dot gnu.org
2022-06-21 11:20 ` dkm at gcc dot gnu.org
2022-06-21 12:48 ` tschwinge at gcc dot gnu.org
2022-06-21 14:56 ` dkm at gcc dot gnu.org
2022-06-23  9:19 ` ro at gcc dot gnu.org
2022-06-25  9:34 ` tschwinge at gcc dot gnu.org
2022-06-29  7:10 ` ro at CeBiTec dot Uni-Bielefeld.DE

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).