public inbox for gcc-rust@gcc.gnu.org
 help / color / mirror / Atom feed
* [Bug rust/113461] New: [14 Regression] rust-proc-macro.cc:174:15: error: format '%lu' expects argument of type 'long unsigned int', but argument 3 has type 'long long unsigned int' [-Werror=format=]
@ 2024-01-17 22:50 danglin at gcc dot gnu.org
  2024-01-18  0:29 ` [Bug rust/113461] " pinskia at gcc dot gnu.org
                   ` (4 more replies)
  0 siblings, 5 replies; 6+ messages in thread
From: danglin at gcc dot gnu.org @ 2024-01-17 22:50 UTC (permalink / raw)
  To: gcc-rust

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

            Bug ID: 113461
           Summary: [14 Regression] rust-proc-macro.cc:174:15: error:
                    format '%lu' expects argument of type 'long unsigned
                    int', but argument 3 has type 'long long unsigned int'
                    [-Werror=format=]
           Product: gcc
           Version: 14.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: rust
          Assignee: unassigned at gcc dot gnu.org
          Reporter: danglin at gcc dot gnu.org
                CC: dkm at gcc dot gnu.org, gcc-rust at gcc dot gnu.org
  Target Milestone: ---
              Host: hppa*-*-linux*
            Target: hppa*-*-linux*
             Build: hppa*-*-linux*

/home/dave/gnu/gcc/objdir/./prev-gcc/xg++
-B/home/dave/gnu/gcc/objdir/./prev-gcc
/ -B/home/dave/opt/gnu/gcc/gcc-14/hppa-linux-gnu/bin/ -nostdinc++
-B/home/dave/g
nu/gcc/objdir/prev-hppa-linux-gnu/libstdc++-v3/src/.libs
-B/home/dave/gnu/gcc/objdir/prev-hppa-linux-gnu/libstdc++-v3/libsupc++/.libs 
-I/home/dave/gnu/gcc/objdir/prev-hppa-linux-gnu/libstdc++-v3/include/hppa-linux-gnu
 -I/home/dave/gnu/gcc/objdir/prev-hppa-linux-gnu/libstdc++-v3/include 
-I/home/dave/gnu/gcc/gcc/libstdc++-v3/libsupc++
-L/home/dave/gnu/gcc/objdir/prev-hppa-linux-gnu/libstdc++-v3/src/.libs
-L/home/dave/gnu/gcc/objdir/prev-hppa-linux-gnu/libstdc++-v3/libsupc++/.libs 
-fno-PIE -c  -DIN_GCC_FRONTEND -g -O2 -fno-checking -DIN_GCC    -fno-exceptions
-fno-rtti -fasynchronous-unwind-tables -W -Wall -Wno-narrowing -Wwrite-strings
-Wcast-qual -Wmissing-format-attribute -Wconditionally-supported
-Woverloaded-virtual -pedantic -Wno-long-long -Wno-variadic-macros
-Wno-overlength-strings -Werror -Wno-unused-parameter   -DHAVE_CONFIG_H
-fno-PIE -I. -Irust -I../../gcc/gcc -I../../gcc/gcc/rust
-I../../gcc/gcc/../include  -I../../gcc/gcc/../libcpp/include
-I../../gcc/gcc/../libcody  -I../../gcc/gcc/../libdecnumber
-I../../gcc/gcc/../libdecnumber/dpd -I../libdecnumber
-I../../gcc/gcc/../libbacktrace   -o rust/rust-macro-invoc-lexer.o -MT
rust/rust-macro-invoc-lexer.o -MMD -MP -MF
rust/.deps/rust-macro-invoc-lexer.TPo -g -O2 -fno-checking -I
../../gcc/gcc/rust -I ../../gcc/gcc/rust/lex -I ../../gcc/gcc/rust/parse -I
../../gcc/gcc/rust/ast -I ../../gcc/gcc/rust/analysis -I
../../gcc/gcc/rust/backend -I ../../gcc/gcc/rust/expand -I
../../gcc/gcc/rust/hir/tree -I ../../gcc/gcc/rust/hir -I
../../gcc/gcc/rust/resolve -I ../../gcc/gcc/rust/util -I
../../gcc/gcc/rust/typecheck -I ../../gcc/gcc/rust/checks/lints -I
../../gcc/gcc/rust/checks/errors -I ../../gcc/gcc/rust/checks/errors/privacy -I
../../gcc/gcc/rust/checks/errors/borrowck -I ../../gcc/gcc/rust/util -I
../../gcc/gcc/rust/metadata -I ../../gcc/gcc/../libgrust
../../gcc/gcc/rust/expand/rust-macro-invoc-lexer.cc
In file included from ../../gcc/gcc/rust/expand/rust-proc-macro.cc:18:
../../gcc/gcc/rust/expand/rust-proc-macro.cc: In function 'const
std::vector<ProcMacro::Procmacro> Rust::load_macros(std::string)':
../../gcc/gcc/rust/expand/rust-proc-macro.cc:174:15: error: format '%lu'
expects argument of type 'long unsigned int', but argument 3 has type 'long
long unsigned int' [-Werror=format=]
  174 |   rust_debug ("Found %lu procedural macros", array->length);
      |               ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~  ~~~~~~~~~~~~~
      |                                                     |
      |                                                     long long unsigned
int
../../gcc/gcc/rust/rust-diagnostics.h:305:57: note: in definition of macro
'rust_debug'
  305 | #define rust_debug(...) rust_debug_loc (UNDEF_LOCATION, __VA_ARGS__)
      |                                                         ^~~~~~~~~~~
../../gcc/gcc/rust/expand/rust-proc-macro.cc:174:24: note: format string is
defined here
  174 |   rust_debug ("Found %lu procedural macros", array->length);
      |                      ~~^
      |                        |
      |                        long unsigned int
      |                      %llu

-- 
You are receiving this mail because:
You are on the CC list for the bug.

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

* [Bug rust/113461] [14 Regression] rust-proc-macro.cc:174:15: error: format '%lu' expects argument of type 'long unsigned int', but argument 3 has type 'long long unsigned int' [-Werror=format=]
  2024-01-17 22:50 [Bug rust/113461] New: [14 Regression] rust-proc-macro.cc:174:15: error: format '%lu' expects argument of type 'long unsigned int', but argument 3 has type 'long long unsigned int' [-Werror=format=] danglin at gcc dot gnu.org
@ 2024-01-18  0:29 ` pinskia at gcc dot gnu.org
  2024-01-18  9:05 ` ro at gcc dot gnu.org
                   ` (3 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: pinskia at gcc dot gnu.org @ 2024-01-18  0:29 UTC (permalink / raw)
  To: gcc-rust

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

Andrew Pinski <pinskia at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|---                         |14.0
             Status|UNCONFIRMED                 |NEW
     Ever confirmed|0                           |1
   Last reconfirmed|                            |2024-01-18
           Keywords|                            |build

--- Comment #1 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
Confirmed, this was also reported on IRC.
I think there will be a patch pushed in the next day or so too to fix this.

-- 
You are receiving this mail because:
You are on the CC list for the bug.

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

* [Bug rust/113461] [14 Regression] rust-proc-macro.cc:174:15: error: format '%lu' expects argument of type 'long unsigned int', but argument 3 has type 'long long unsigned int' [-Werror=format=]
  2024-01-17 22:50 [Bug rust/113461] New: [14 Regression] rust-proc-macro.cc:174:15: error: format '%lu' expects argument of type 'long unsigned int', but argument 3 has type 'long long unsigned int' [-Werror=format=] danglin at gcc dot gnu.org
  2024-01-18  0:29 ` [Bug rust/113461] " pinskia at gcc dot gnu.org
@ 2024-01-18  9:05 ` ro at gcc dot gnu.org
  2024-01-18  9:06 ` ro at gcc dot gnu.org
                   ` (2 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: ro at gcc dot gnu.org @ 2024-01-18  9:05 UTC (permalink / raw)
  To: gcc-rust

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Target|hppa*-*-linux*              |hppa*-*-linux*,
                   |                            |*-*-solaris2.11
                 CC|                            |ro at gcc dot gnu.org

--- Comment #2 from Rainer Orth <ro at gcc dot gnu.org> ---
I'm seeing the same on 32-bit Solaris/SPARC and x86.  On top of that, there's
also

/vol/gcc/src/hg/master/local/gcc/rust/backend/rust-compile-base.cc: In member
function 'tree_node*
Rust::Compile::HIRCompileBase::resolve_method_address(Rust::TyTy::FnType*,
Rust::TyTy::BaseType*, location_t)':
/vol/gcc/src/hg/master/local/gcc/rust/backend/rust-compile-base.cc:968:46:
error: format '%lu' expects argument of type 'long unsigned int', but argument
3 has type 'std::set<Rust::Resolver::PathProbeCandidate>::size_type' {aka
'unsigned int'} [-Werror=format=]
  968 |   rust_debug_loc (expr_locus, "resolved to %lu candidates",
candidates.size ());
      |                                            ~~^             
~~~~~~~~~~~~~~~~~~
      |                                              |                         
    |
      |                                              long unsigned int         
    std::set<Rust::Resolver::PathProbeCandidate>::size_type {aka unsigned int}
      |                                            %u

I'm using the attached patch to fix the build.

-- 
You are receiving this mail because:
You are on the CC list for the bug.

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

* [Bug rust/113461] [14 Regression] rust-proc-macro.cc:174:15: error: format '%lu' expects argument of type 'long unsigned int', but argument 3 has type 'long long unsigned int' [-Werror=format=]
  2024-01-17 22:50 [Bug rust/113461] New: [14 Regression] rust-proc-macro.cc:174:15: error: format '%lu' expects argument of type 'long unsigned int', but argument 3 has type 'long long unsigned int' [-Werror=format=] danglin at gcc dot gnu.org
  2024-01-18  0:29 ` [Bug rust/113461] " pinskia at gcc dot gnu.org
  2024-01-18  9:05 ` ro at gcc dot gnu.org
@ 2024-01-18  9:06 ` ro at gcc dot gnu.org
  2024-01-18  9:10 ` pinskia at gcc dot gnu.org
  2024-03-04  4:16 ` law at gcc dot gnu.org
  4 siblings, 0 replies; 6+ messages in thread
From: ro at gcc dot gnu.org @ 2024-01-18  9:06 UTC (permalink / raw)
  To: gcc-rust

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

--- Comment #3 from Rainer Orth <ro at gcc dot gnu.org> ---
Created attachment 57135
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=57135&action=edit
Proposed patch

Tested on i386-pc-solaris2.11, sparc-sun-solaris2.11, and x86_64-pc-linux-gnu.

-- 
You are receiving this mail because:
You are on the CC list for the bug.

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

* [Bug rust/113461] [14 Regression] rust-proc-macro.cc:174:15: error: format '%lu' expects argument of type 'long unsigned int', but argument 3 has type 'long long unsigned int' [-Werror=format=]
  2024-01-17 22:50 [Bug rust/113461] New: [14 Regression] rust-proc-macro.cc:174:15: error: format '%lu' expects argument of type 'long unsigned int', but argument 3 has type 'long long unsigned int' [-Werror=format=] danglin at gcc dot gnu.org
                   ` (2 preceding siblings ...)
  2024-01-18  9:06 ` ro at gcc dot gnu.org
@ 2024-01-18  9:10 ` pinskia at gcc dot gnu.org
  2024-03-04  4:16 ` law at gcc dot gnu.org
  4 siblings, 0 replies; 6+ messages in thread
From: pinskia at gcc dot gnu.org @ 2024-01-18  9:10 UTC (permalink / raw)
  To: gcc-rust

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

--- Comment #4 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
Try after r14-8211-g2341df1cb9b3681bfefe29207887b2b3dc271a95 which was just
committed.

-- 
You are receiving this mail because:
You are on the CC list for the bug.

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

* [Bug rust/113461] [14 Regression] rust-proc-macro.cc:174:15: error: format '%lu' expects argument of type 'long unsigned int', but argument 3 has type 'long long unsigned int' [-Werror=format=]
  2024-01-17 22:50 [Bug rust/113461] New: [14 Regression] rust-proc-macro.cc:174:15: error: format '%lu' expects argument of type 'long unsigned int', but argument 3 has type 'long long unsigned int' [-Werror=format=] danglin at gcc dot gnu.org
                   ` (3 preceding siblings ...)
  2024-01-18  9:10 ` pinskia at gcc dot gnu.org
@ 2024-03-04  4:16 ` law at gcc dot gnu.org
  4 siblings, 0 replies; 6+ messages in thread
From: law at gcc dot gnu.org @ 2024-03-04  4:16 UTC (permalink / raw)
  To: gcc-rust

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

Jeffrey A. Law <law at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         Resolution|---                         |FIXED
             Status|NEW                         |RESOLVED
                 CC|                            |law at gcc dot gnu.org

--- Comment #5 from Jeffrey A. Law <law at gcc dot gnu.org> ---
Should be fixed on the trunk now.

-- 
You are receiving this mail because:
You are on the CC list for the bug.

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

end of thread, other threads:[~2024-03-04  4:16 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-01-17 22:50 [Bug rust/113461] New: [14 Regression] rust-proc-macro.cc:174:15: error: format '%lu' expects argument of type 'long unsigned int', but argument 3 has type 'long long unsigned int' [-Werror=format=] danglin at gcc dot gnu.org
2024-01-18  0:29 ` [Bug rust/113461] " pinskia at gcc dot gnu.org
2024-01-18  9:05 ` ro at gcc dot gnu.org
2024-01-18  9:06 ` ro at gcc dot gnu.org
2024-01-18  9:10 ` pinskia at gcc dot gnu.org
2024-03-04  4:16 ` law at gcc dot gnu.org

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