public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug debug/110073] New: [14 regression] btfout.cc format errors break bootstrap
@ 2023-06-01 10:05 ro at gcc dot gnu.org
  2023-06-01 10:05 ` [Bug debug/110073] " ro at gcc dot gnu.org
                   ` (11 more replies)
  0 siblings, 12 replies; 13+ messages in thread
From: ro at gcc dot gnu.org @ 2023-06-01 10:05 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 110073
           Summary: [14 regression] btfout.cc format errors break
                    bootstrap
           Product: gcc
           Version: 13.0
            Status: UNCONFIRMED
          Keywords: build
          Severity: normal
          Priority: P3
         Component: debug
          Assignee: unassigned at gcc dot gnu.org
          Reporter: ro at gcc dot gnu.org
                CC: david.faust at oracle dot com
  Target Milestone: ---
            Target: i386-pc-solaris2.11

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

This patch

commit 7aae58b04b92303ccda3ead600be98f0d4b7f462
Author: David Faust <david.faust@oracle.com>
Date:   Wed May 31 08:31:24 2023 -0700

    btf: improve -dA comments for testsuite

broke (at least) Solaris/x86 bootstrap:

/vol/gcc/src/hg/master/local/gcc/btfout.cc: In function 'void
btf_asm_type(ctf_container_ref, ctf_dtdef_ref)':
/vol/gcc/src/hg/master/local/gcc/btfout.cc:802:32: error: format '%lu' expects
argument of type 'long unsigned int', but argument 4 has type 'ctf_id_t' {aka
'long long unsigned int'} [-Werror=format=]
  802 |                        "TYPE %lu BTF_KIND_%s '%s'",
      |                              ~~^
      |                                |
      |                                long unsigned int
      |                              %llu
  803 |                        get_btf_id (dtd->dtd_type), btf_kind_name
(btf_kind),
      |                        ~~~~~~~~~~~~~~~~~~~~~~~~~~
      |                                   |
      |                                   ctf_id_t {aka long long unsigned int}

ctf_id_t is uint64_t, from gcc/ctfc.h; should use PRIu64 instead

/vol/gcc/src/hg/master/local/gcc/btfout.cc: In function 'void
btf_asm_func_type(ctf_container_ref, ctf_dtdef_ref, std::size_t)':
/vol/gcc/src/hg/master/local/gcc/btfout.cc:944:32: error: format '%lu' expects
argument of type 'long unsigned int', but argument 4 has type 'unsigned int'
[-Werror=format=]
  944 |                        "TYPE %lu BTF_KIND_FUNC '%s'",
      |                              ~~^
      |                                |
     |                              ~~^
      |                                |
      |                                long unsigned int
      |                              %u
  945 |                        num_types_added + num_vars_added + 1 + i,
      |                        ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      |                                                             |
      |                                                             unsigned
int

just use %u instead

The attached patch allowed the build to succeed; make check still running.

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

end of thread, other threads:[~2023-06-29  8:47 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-06-01 10:05 [Bug debug/110073] New: [14 regression] btfout.cc format errors break bootstrap ro at gcc dot gnu.org
2023-06-01 10:05 ` [Bug debug/110073] " ro at gcc dot gnu.org
2023-06-01 16:50 ` david.faust at oracle dot com
2023-06-02  8:38 ` iains at gcc dot gnu.org
2023-06-02 12:58 ` iains at gcc dot gnu.org
2023-06-02 15:49 ` david.faust at oracle dot com
2023-06-02 16:24 ` iains at gcc dot gnu.org
2023-06-02 16:32 ` david.faust at oracle dot com
2023-06-02 16:33 ` cvs-commit at gcc dot gnu.org
2023-06-02 16:35 ` acoplan at gcc dot gnu.org
2023-06-02 16:41 ` david.faust at oracle dot com
2023-06-29  8:00 ` iains at gcc dot gnu.org
2023-06-29  8:47 ` ro 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).