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

* [Bug rust/105913] gccrs doesn't compile on 32-bit targets
  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 ` ro at gcc dot gnu.org
  2022-06-10 12:30 ` tschwinge at gcc dot gnu.org
                   ` (8 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: ro at gcc dot gnu.org @ 2022-06-10 11:34 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #1 from Rainer Orth <ro at gcc dot gnu.org> ---
Also known as gccrs Issue #1229.

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

* [Bug rust/105913] gccrs doesn't compile on 32-bit targets
  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
                   ` (7 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: tschwinge at gcc dot gnu.org @ 2022-06-10 12:30 UTC (permalink / raw)
  To: gcc-bugs

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

Thomas Schwinge <tschwinge at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
            Version|13.0                        |rust/master
           See Also|                            |https://github.com/Rust-GCC
                   |                            |/gccrs/issues/1229
     Ever confirmed|0                           |1
   Last reconfirmed|                            |2022-06-10
             Status|UNCONFIRMED                 |NEW
                 CC|                            |tschwinge at gcc dot gnu.org

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

* [Bug rust/105913] gccrs doesn't compile on 32-bit targets
  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
                   ` (6 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: tschwinge at gcc dot gnu.org @ 2022-06-14  7:55 UTC (permalink / raw)
  To: gcc-bugs

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

Thomas Schwinge <tschwinge at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |ASSIGNED
           Assignee|unassigned at gcc dot gnu.org      |dkm at gcc dot gnu.org
           See Also|                            |https://github.com/Rust-GCC
                   |                            |/gccrs/pull/1308

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

* [Bug rust/105913] gccrs doesn't compile on 32-bit targets
  2022-06-10 11:22 [Bug rust/105913] New: gccrs doesn't compile on 32-bit targets ro at gcc dot gnu.org
                   ` (2 preceding siblings ...)
  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
                   ` (5 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: tschwinge at gcc dot gnu.org @ 2022-06-21 10:35 UTC (permalink / raw)
  To: gcc-bugs

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

Thomas Schwinge <tschwinge at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|ASSIGNED                    |RESOLVED
         Resolution|---                         |FIXED

--- Comment #2 from Thomas Schwinge <tschwinge at gcc dot gnu.org> ---
Assuming fixed via <https://github.com/Rust-GCC/gccrs/pull/1308> "Fix
formatting error on 32-bits targets".

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

* [Bug rust/105913] gccrs doesn't compile on 32-bit targets
  2022-06-10 11:22 [Bug rust/105913] New: gccrs doesn't compile on 32-bit targets ro at gcc dot gnu.org
                   ` (3 preceding siblings ...)
  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
                   ` (4 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: dkm at gcc dot gnu.org @ 2022-06-21 11:20 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #3 from Marc Poulhiès <dkm at gcc dot gnu.org> ---
Fixed in github, but not yet in gcc's repository AFAIK.

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

* [Bug rust/105913] gccrs doesn't compile on 32-bit targets
  2022-06-10 11:22 [Bug rust/105913] New: gccrs doesn't compile on 32-bit targets ro at gcc dot gnu.org
                   ` (4 preceding siblings ...)
  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
                   ` (3 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: tschwinge at gcc dot gnu.org @ 2022-06-21 12:48 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #4 from Thomas Schwinge <tschwinge at gcc dot gnu.org> ---
(In reply to Marc Poulhiès from comment #3)
> Fixed in github, but not yet in gcc's repository AFAIK.

It is, as of today, 10:33 UTC, when I did the 'git push'.  ;-).


(If there's more to do, then please re-open this PR, of course.)

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

* [Bug rust/105913] gccrs doesn't compile on 32-bit targets
  2022-06-10 11:22 [Bug rust/105913] New: gccrs doesn't compile on 32-bit targets ro at gcc dot gnu.org
                   ` (5 preceding siblings ...)
  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
                   ` (2 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: dkm at gcc dot gnu.org @ 2022-06-21 14:56 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #5 from Marc Poulhiès <dkm at gcc dot gnu.org> ---
Oh, nice, should have checked before commenting then ! Thanks !

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

* [Bug rust/105913] gccrs doesn't compile on 32-bit targets
  2022-06-10 11:22 [Bug rust/105913] New: gccrs doesn't compile on 32-bit targets ro at gcc dot gnu.org
                   ` (6 preceding siblings ...)
  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
  9 siblings, 0 replies; 11+ messages in thread
From: ro at gcc dot gnu.org @ 2022-06-23  9:19 UTC (permalink / raw)
  To: gcc-bugs

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

Rainer Orth <ro at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         Resolution|FIXED                       |---
             Status|RESOLVED                    |REOPENED

--- Comment #6 from Rainer Orth <ro at gcc dot gnu.org> ---
Unfortunately, after I created my original patch, another instance of the same
issue crept in: reported upstream with an incremental patch.

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

* [Bug rust/105913] gccrs doesn't compile on 32-bit targets
  2022-06-10 11:22 [Bug rust/105913] New: gccrs doesn't compile on 32-bit targets ro at gcc dot gnu.org
                   ` (7 preceding siblings ...)
  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
  9 siblings, 0 replies; 11+ messages in thread
From: tschwinge at gcc dot gnu.org @ 2022-06-25  9:34 UTC (permalink / raw)
  To: gcc-bugs

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

Thomas Schwinge <tschwinge at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         Resolution|---                         |FIXED
             Status|REOPENED                    |RESOLVED

--- Comment #7 from Thomas Schwinge <tschwinge at gcc dot gnu.org> ---
But now really assuming fixed via additional
<https://github.com/Rust-GCC/gccrs/pull/1331> "Fix remaining misuses of format
specifiers on 32-bit targets".

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

* [Bug rust/105913] gccrs doesn't compile on 32-bit targets
  2022-06-10 11:22 [Bug rust/105913] New: gccrs doesn't compile on 32-bit targets ro at gcc dot gnu.org
                   ` (8 preceding siblings ...)
  2022-06-25  9:34 ` tschwinge at gcc dot gnu.org
@ 2022-06-29  7:10 ` ro at CeBiTec dot Uni-Bielefeld.DE
  9 siblings, 0 replies; 11+ messages in thread
From: ro at CeBiTec dot Uni-Bielefeld.DE @ 2022-06-29  7:10 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #8 from ro at CeBiTec dot Uni-Bielefeld.DE <ro at CeBiTec dot Uni-Bielefeld.DE> ---
> --- Comment #7 from Thomas Schwinge <tschwinge at gcc dot gnu.org> ---
> But now really assuming fixed via additional
> <https://github.com/Rust-GCC/gccrs/pull/1331> "Fix remaining misuses of format
> specifiers on 32-bit targets".

Now confirmed on both i386-pc-solaris2.11 and sparc-sun-solaris2.11
(which needs the hack from PR c++/106072).

^ 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).