From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 31003385772B; Thu, 1 Jun 2023 16:50:43 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 31003385772B DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1685638244; bh=YDplvxhVNjld+zevRoV7o/glN5PZrkxYd2YJoPnr4QY=; h=From:To:Subject:Date:In-Reply-To:References:From; b=C16OCkO3OC4etGRtPMnU4U3WG1z2JBFKliYWY9O8PBCQw8TXN6eEiBp1L/25qO3ub su1vtIchuiJ4zNinwCucsLRoJr7+Emp9OAkggSpJCFMmbE/OLnE9bVEu6hVDAx/YAK dzvUks17XQ1ssa0AeTo9CcGoPE+EAO6B7RyOycTI= From: "david.faust at oracle dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug debug/110073] [14 regression] btfout.cc format errors break bootstrap Date: Thu, 01 Jun 2023 16:50:43 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: debug X-Bugzilla-Version: 13.0 X-Bugzilla-Keywords: build X-Bugzilla-Severity: normal X-Bugzilla-Who: david.faust at oracle dot com X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: 14.0 X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: attachments.created Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 List-Id: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D110073 --- Comment #1 from David Faust --- Created attachment 55234 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=3D55234&action=3Dedit alternate proposed patch Thank you for catching this, and for the fix! With the proposed patch on linux x86_64 I see the following: ../../../gcc/gcc/btfout.cc: In function =E2=80=98void btf_asm_func_type(ctf_container_ref, ctf_dtdef_ref, size_t)=E2=80=99: ../../../gcc/gcc/btfout.cc:952:31: warning: format =E2=80=98%u=E2=80=99 exp= ects argument of type =E2=80=98unsigned int=E2=80=99, but argument 4 has type =E2=80=98size_= t=E2=80=99 {aka =E2=80=98long unsigned int=E2=80=99} [-Wformat=3D] 952 | "TYPE %u BTF_KIND_FUNC '%s'", | ~^ | | | unsigned int | %lu 953 | num_types_added + num_vars_added + 1 + i, | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | | | size_t = {aka long unsigned int} I believe %zu instead of %u should work. Alternatively, a small refactor to the offending code makes it behave in li= ne with the other functions (to properly use a ctf_id_t, and then PRIu64 as in your patch). But I haven't verified this on solaris/x86 yet.=