Message ID | ZHoSxwZsh98WrBSU@arm.com |
---|---|
State | Committed |
Commit | f2e60a00c7c017bd87ba9afb189cbb77d8c92925 |
Headers |
Return-Path: <gcc-patches-bounces+patchwork=sourceware.org@gcc.gnu.org> X-Original-To: patchwork@sourceware.org Delivered-To: patchwork@sourceware.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id C4D793858C20 for <patchwork@sourceware.org>; Fri, 2 Jun 2023 16:04:06 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org C4D793858C20 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1685721846; bh=jHUFkJUvNRnUMGi7P6Ctns2NGkJpH2ijkwZVeB0659s=; h=Date:To:Cc:Subject:List-Id:List-Unsubscribe:List-Archive: List-Post:List-Help:List-Subscribe:From:Reply-To:From; b=bGka2zxAzCPw1pFK1PqNECMz2inKsUI+i7eNXe/a6Mmq8qtUMP34nF5hlyKbbdS7F 9/BCenQsw0ZCx9e9DGhIXz8dwv6Vi2CFaqje6XmlE3ZGDx9b7SZ2t71TvWcBOSEPfU IA3M95yADf7htaPHFGzzvtvh8mJnRJLYeL9nMfTg= X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from EUR05-AM6-obe.outbound.protection.outlook.com (mail-am6eur05on2062.outbound.protection.outlook.com [40.107.22.62]) by sourceware.org (Postfix) with ESMTPS id 0A5323858D32 for <gcc-patches@gcc.gnu.org>; Fri, 2 Jun 2023 16:03:37 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 0A5323858D32 Received: from DUZP191CA0009.EURP191.PROD.OUTLOOK.COM (2603:10a6:10:4f9::17) by AS8PR08MB10025.eurprd08.prod.outlook.com (2603:10a6:20b:630::17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6455.24; Fri, 2 Jun 2023 16:03:32 +0000 Received: from DBAEUR03FT041.eop-EUR03.prod.protection.outlook.com (2603:10a6:10:4f9:cafe::d8) by DUZP191CA0009.outlook.office365.com (2603:10a6:10:4f9::17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6455.24 via Frontend Transport; Fri, 2 Jun 2023 16:03:32 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 63.35.35.123) smtp.mailfrom=arm.com; dkim=pass (signature was verified) header.d=armh.onmicrosoft.com;dmarc=pass action=none header.from=arm.com; Received-SPF: Pass (protection.outlook.com: domain of arm.com designates 63.35.35.123 as permitted sender) receiver=protection.outlook.com; client-ip=63.35.35.123; helo=64aa7808-outbound-1.mta.getcheckrecipient.com; pr=C Received: from 64aa7808-outbound-1.mta.getcheckrecipient.com (63.35.35.123) by DBAEUR03FT041.mail.protection.outlook.com (100.127.142.233) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6455.24 via Frontend Transport; Fri, 2 Jun 2023 16:03:32 +0000 Received: ("Tessian outbound 3570909035da:v136"); Fri, 02 Jun 2023 16:03:31 +0000 X-CheckRecipientChecked: true X-CR-MTA-CID: 0941da68e0e931cd X-CR-MTA-TID: 64aa7808 Received: from 9b6140ec1b8a.1 by 64aa7808-outbound-1.mta.getcheckrecipient.com id 1E42B274-EB16-4E91-9F54-C9572C44412B.1; Fri, 02 Jun 2023 16:03:24 +0000 Received: from EUR03-DBA-obe.outbound.protection.outlook.com by 64aa7808-outbound-1.mta.getcheckrecipient.com with ESMTPS id 9b6140ec1b8a.1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384); Fri, 02 Jun 2023 16:03:24 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=kOQdblHwkIx/ur5t8SsEydbdddWFp5zsJB5nzIwOZLK3Ay8ayj/S3rITYLx0SCHsohXm0xlz1SA00yNP3a/JEHWmrzoWWR+FdINnXQLZQljKlbKE+OhplmEwmN+MBcKT0asPBWiYRUYsbuzHhXpnFipd9fSUroNtL+QUlW+990Cxw0BVosvfVlkH7mQeQYRIrUFmJbohCBTWBUNUTzHEoApV0Zmutby3YSoqtfsmMdn07u3nXklfO/LA3GxTZkR5MkkY2FmCnz/ic5so+EEfgviD1v3upYE381XMAfo2BCLPvn79RRUuzUCAwsgWDMbijtEApWIAMA7KQueAymhM3g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=jHUFkJUvNRnUMGi7P6Ctns2NGkJpH2ijkwZVeB0659s=; b=JwCZrXQFXSSXoCkfcBcJqj0dt1aL6cktGdrburGXHW+GxyZtiiCtC/OsHKVwS+52/36hg++W4CtrVE+jF9WRRed6qDH3CTsXhvwD2EDCU1PJQAF5QW2t9NmrbAWdfxpMQhEqOybLkoOGyLEhml1OK5pDMe9x0FrtNM8iVM2cyPoXbOv8wquccgO96kmwAJCI+Fyn4Xtr80LEGbrGc7K07NSp0klz1fQxpEo392bTWZr8ZwDBZePRfXdK21AZnad9Mut+jztP7X5pNvEYm/R/zzaRYQWfzmROKPIubNrKIMIxQsnmwOfEjd0Eo2FYt2mLx8BCQdAV/yzeXJb333NvtA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=arm.com; dmarc=pass action=none header.from=arm.com; dkim=pass header.d=arm.com; arc=none Authentication-Results-Original: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=arm.com; Received: from PAXPR08MB7201.eurprd08.prod.outlook.com (2603:10a6:102:20b::17) by AM8PR08MB6516.eurprd08.prod.outlook.com (2603:10a6:20b:363::6) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6455.24; Fri, 2 Jun 2023 16:03:23 +0000 Received: from PAXPR08MB7201.eurprd08.prod.outlook.com ([fe80::5b72:ef2:156a:296a]) by PAXPR08MB7201.eurprd08.prod.outlook.com ([fe80::5b72:ef2:156a:296a%6]) with mapi id 15.20.6455.024; Fri, 2 Jun 2023 16:03:23 +0000 Date: Fri, 2 Jun 2023 17:03:19 +0100 To: gcc-patches@gcc.gnu.org Cc: Iain Sandoe <iain@sandoe.co.uk>, David Faust <david.faust@oracle.com> Subject: [PATCH][committed] btf: Fix -Wformat errors Message-ID: <ZHoSxwZsh98WrBSU@arm.com> Content-Type: multipart/mixed; boundary="xq+8ja/fQvUwRjkF" Content-Disposition: inline X-ClientProxiedBy: LO4P265CA0251.GBRP265.PROD.OUTLOOK.COM (2603:10a6:600:350::19) To PAXPR08MB7201.eurprd08.prod.outlook.com (2603:10a6:102:20b::17) MIME-Version: 1.0 X-MS-TrafficTypeDiagnostic: PAXPR08MB7201:EE_|AM8PR08MB6516:EE_|DBAEUR03FT041:EE_|AS8PR08MB10025:EE_ X-MS-Office365-Filtering-Correlation-Id: 09e8f5c3-a944-4932-1ccf-08db6382e9b0 x-checkrecipientrouted: true NoDisclaimer: true X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam-Untrusted: BCL:0; X-Microsoft-Antispam-Message-Info-Original: 74gcXr9tMh9wGDfDteRKS/Bx9JO12Udf+xPTzMmYykJCq3OEtGdeiUS9Wj2FqRwTeWVToBMWyenpFKtKEuqLuBI+vXxxCxLa0p40SjL3RWtESco1dZacmfWvjdHr9yKk5cGoHTQWacXoQ/lcfiomeHCsGLpd1MmgEDqx2D/1XDRKuGGeVGIuh7yTjgHNR7Cj7isaYmsqfPlNKNAIGUcA+1IW+KpM9sVEptJVxUNAftPdEPrIDKRZNz0JWElq6MDlcTULAKQLQTtJOHrd3sVuqFxybjcsAQ7B/KFKPNPwhPLISTc+0r9fvvZOjQm+wUNoQGlYkOUyUkGEMeEE3Ha7rze2oBlmfqlN6iBs7BdjX6/RDDy3XeRCuWMGwFYW8pTOy5yHmCI+K60/L7HItHHrIxMYdnQ0qYi48hoG+qOoVDZv+kyW9a/DhyoBA/wgKXvQcU8ZgSNzRgtuULOdRPiCac7TF3Gp2QcsKXRZvi0/phw+hU9Sl+ESSwKOG03Y0SrzoB9dKLwlMpYPP+n+7aMAEU9v+FYNtFtzVjq7TR33MzHQ7BgYQ8yvphJb3NrrNfeQ+xnp5LkoPf017Pp/hKRegfb1LeEjKGSYWeGVFYx3jevBGXUqVBsf6TKkDy53+k8O X-Forefront-Antispam-Report-Untrusted: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:PAXPR08MB7201.eurprd08.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230028)(4636009)(39860400002)(366004)(396003)(346002)(136003)(376002)(451199021)(235185007)(186003)(6506007)(6512007)(26005)(478600001)(44144004)(6666004)(33964004)(2616005)(41300700001)(21480400003)(8936002)(5660300002)(44832011)(2906002)(8676002)(316002)(6486002)(54906003)(66946007)(6916009)(66556008)(66476007)(86362001)(564344004)(4326008)(36756003)(38100700002)(2700100001); DIR:OUT; SFP:1101; X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM8PR08MB6516 Original-Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=arm.com; X-EOPAttributedMessage: 0 X-MS-Exchange-Transport-CrossTenantHeadersStripped: DBAEUR03FT041.eop-EUR03.prod.protection.outlook.com X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id-Prvs: 21d19423-98ff-45b2-033a-08db6382e40c X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: TM11W9dBcA6mU7/r3zh1mv12eRbE6DCb4QEIduf3A/Uhc7N4WcoKqe0HjKcN0o2JYaoEyuLlpoW3sjiLwU9F3ox6Ejjj+YN1pWX+gg9M9kjdPJwByXzxEh86QgBqRPH69iBVMiP+h/r1YensMxT+4O3+qJu7Mh5VbGNSTduV4Kw4W0yaQyWbW5F6xB2pK0N409tujDvSR+s6teJ+biqfNzn0EqFaLwSnoaZgjoSWFIQ5gZKWHXac9S34skxK5bfXnMlVxjTDdlZwykStW3Q15C8ZjKhAClYXzucq8yBsdVgWjzuoCFNsCUOMuh5Mus1Pz9PevJ26BaBVd565b2EazLP5Gs+r8YHMrWodq3V8DbZXgsA4N3X4i0WsQXlWJCMoehaL6VvjX/V/CAjIUl+4fnsHXDSeim/rZ0xb9I2m9E9VopSeFjxkEQb8yFDJ7DUrSKIMpI6X4TCqua1byz833QNHMEOh49YpF4fAsM29BQ+JXG7HWAHN8jVpy9L1O4qZuoN3m83FZ6vElRqamc+iNWH5NmVnoCTtKZ/JoLxjYuijTNbR9ICH0ONbjZWHToh1nI2SvINkyv+Y4CsYGhiDBCdNGiDDd0/EEeLh0TV7eJeQhHdARtY6md3tVoiVPNPXe3A1HVqVYaSSGq6IJqcWiRRORCEV4Po1ktMl+MuyY0I7UCjUUX7L1UWSzcq3UEl8zN51Fnuns8uZRfaVNSq1cJBnR+6DabMgJzJFmB2TgFnRHMcMTA6q9fUVeoRiVyM9CUYxtvjgiS6tArvEXa73tA== X-Forefront-Antispam-Report: CIP:63.35.35.123; CTRY:IE; LANG:en; SCL:1; SRV:; IPV:CAL; SFV:NSPM; H:64aa7808-outbound-1.mta.getcheckrecipient.com; PTR:ec2-63-35-35-123.eu-west-1.compute.amazonaws.com; CAT:NONE; SFS:(13230028)(4636009)(396003)(346002)(376002)(136003)(39860400002)(451199021)(46966006)(36840700001)(40470700004)(186003)(54906003)(478600001)(44144004)(70586007)(82310400005)(6486002)(4326008)(6666004)(316002)(41300700001)(86362001)(70206006)(33964004)(6916009)(36756003)(564344004)(40460700003)(44832011)(107886003)(40480700001)(47076005)(36860700001)(235185007)(5660300002)(82740400003)(26005)(2906002)(21480400003)(6506007)(2616005)(6512007)(8676002)(8936002)(356005)(81166007)(336012)(2700100001); DIR:OUT; SFP:1101; X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 02 Jun 2023 16:03:32.0588 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 09e8f5c3-a944-4932-1ccf-08db6382e9b0 X-MS-Exchange-CrossTenant-Id: f34e5979-57d9-4aaa-ad4d-b122a662184d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=f34e5979-57d9-4aaa-ad4d-b122a662184d; Ip=[63.35.35.123]; Helo=[64aa7808-outbound-1.mta.getcheckrecipient.com] X-MS-Exchange-CrossTenant-AuthSource: DBAEUR03FT041.eop-EUR03.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: AS8PR08MB10025 X-Spam-Status: No, score=-12.3 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, FORGED_SPF_HELO, GIT_PATCH_0, KAM_DMARC_NONE, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2, SPF_HELO_PASS, SPF_NONE, TXREP, T_SCC_BODY_TEXT_LINE, UNPARSEABLE_RELAY autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: gcc-patches@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-patches mailing list <gcc-patches.gcc.gnu.org> List-Unsubscribe: <https://gcc.gnu.org/mailman/options/gcc-patches>, <mailto:gcc-patches-request@gcc.gnu.org?subject=unsubscribe> List-Archive: <https://gcc.gnu.org/pipermail/gcc-patches/> List-Post: <mailto:gcc-patches@gcc.gnu.org> List-Help: <mailto:gcc-patches-request@gcc.gnu.org?subject=help> List-Subscribe: <https://gcc.gnu.org/mailman/listinfo/gcc-patches>, <mailto:gcc-patches-request@gcc.gnu.org?subject=subscribe> From: Alex Coplan via Gcc-patches <gcc-patches@gcc.gnu.org> Reply-To: Alex Coplan <alex.coplan@arm.com> Errors-To: gcc-patches-bounces+patchwork=sourceware.org@gcc.gnu.org Sender: "Gcc-patches" <gcc-patches-bounces+patchwork=sourceware.org@gcc.gnu.org> |
Series |
[committed] btf: Fix -Wformat errors
|
|
Checks
Context | Check | Description |
---|---|---|
linaro-tcwg-bot/tcwg_gcc_build--master-arm | success | Testing passed |
linaro-tcwg-bot/tcwg_gcc_build--master-aarch64 | success | Testing passed |
linaro-tcwg-bot/tcwg_gcc_check--master-aarch64 | success | Testing passed |
linaro-tcwg-bot/tcwg_gcc_check--master-arm | success | Testing passed |
Commit Message
Alex Coplan
June 2, 2023, 4:03 p.m. UTC
Hi, g:7aae58b04b92303ccda3ead600be98f0d4b7f462 introduced -Wformat errors breaking bootstrap on some targets. This patch fixes that. Committed as obvious. Thanks, Alex gcc/ChangeLog: * btfout.cc (btf_asm_type): Use PRIu64 instead of %lu for uint64_t. (btf_asm_datasec_type): Likewise. commit e2dc586ecadd2399d5ebb14094d78fff1e6caf55 Author: Alex Coplan <alex.coplan@arm.com> Date: Fri Jun 2 16:50:45 2023 btf: Fix -Wformat errors in btfout.cc
Comments
Hi Alex, > g:7aae58b04b92303ccda3ead600be98f0d4b7f462 introduced -Wformat errors > breaking bootstrap on some targets. This patch fixes that. > > Committed as obvious. > > Thanks, > Alex > > gcc/ChangeLog: > > * btfout.cc (btf_asm_type): Use PRIu64 instead of %lu for uint64_t. > (btf_asm_datasec_type): Likewise. This is PR libstdc++/110077. Btw., your fix is incomplete: it needs another change (%lu -> %zu) in btf_asm_func_type. Rainer
> On 2 Jun 2023, at 17:18, Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE> wrote: > > Hi Alex, > >> g:7aae58b04b92303ccda3ead600be98f0d4b7f462 introduced -Wformat errors >> breaking bootstrap on some targets. This patch fixes that. >> >> Committed as obvious. >> >> Thanks, >> Alex >> >> gcc/ChangeLog: >> >> * btfout.cc (btf_asm_type): Use PRIu64 instead of %lu for uint64_t. >> (btf_asm_datasec_type): Likewise. > > This is PR libstdc++/110077. Btw., your fix is incomplete: it needs > another change (%lu -> %zu) in btf_asm_func_type. I think there’s a typo in the PR ref? https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110073 Iain
On Fri, Jun 02, 2023 at 06:18:38PM +0200, Rainer Orth wrote: > Hi Alex, > > > g:7aae58b04b92303ccda3ead600be98f0d4b7f462 introduced -Wformat errors > > breaking bootstrap on some targets. This patch fixes that. > > > > Committed as obvious. > > > > Thanks, > > Alex > > > > gcc/ChangeLog: > > > > * btfout.cc (btf_asm_type): Use PRIu64 instead of %lu for uint64_t. > > (btf_asm_datasec_type): Likewise. > > This is PR libstdc++/110077. Btw., your fix is incomplete: it needs > another change (%lu -> %zu) in btf_asm_func_type. Can we rely on %zu working? Sure, it is in C99 and so in C++11 as well, but I don't see it being used inside of gcc/ at all and not sure if all host C libraries support it. Jakub
On 02/06/2023 18:45, Jakub Jelinek wrote: > On Fri, Jun 02, 2023 at 06:18:38PM +0200, Rainer Orth wrote: > > Hi Alex, > > > > > g:7aae58b04b92303ccda3ead600be98f0d4b7f462 introduced -Wformat errors > > > breaking bootstrap on some targets. This patch fixes that. > > > > > > Committed as obvious. > > > > > > Thanks, > > > Alex > > > > > > gcc/ChangeLog: > > > > > > * btfout.cc (btf_asm_type): Use PRIu64 instead of %lu for uint64_t. > > > (btf_asm_datasec_type): Likewise. > > > > This is PR libstdc++/110077. Btw., your fix is incomplete: it needs > > another change (%lu -> %zu) in btf_asm_func_type. > > Can we rely on %zu working? Sure, it is in C99 and so in C++11 as well, > but I don't see it being used inside of gcc/ at all and not sure if all host > C libraries support it. Looks like the follow-up patch from David fixes this without relying on %zu: https://gcc.gnu.org/pipermail/gcc-patches/2023-June/620524.html Alex > > Jakub >
diff --git a/gcc/btfout.cc b/gcc/btfout.cc index f51ccf73242..1ea68b9e8ba 100644 --- a/gcc/btfout.cc +++ b/gcc/btfout.cc @@ -799,7 +799,7 @@ btf_asm_type (ctf_container_ref ctfc, ctf_dtdef_ref dtd) } dw2_asm_output_data (4, dtd->dtd_data.ctti_name, - "TYPE %lu BTF_KIND_%s '%s'", + "TYPE %" PRIu64 " BTF_KIND_%s '%s'", get_btf_id (dtd->dtd_type), btf_kind_name (btf_kind), dtd->dtd_name); dw2_asm_output_data (4, BTF_TYPE_INFO (btf_kind, btf_kflag, btf_vlen), @@ -967,7 +967,7 @@ btf_asm_datasec_type (ctf_container_ref ctfc, btf_datasec_t ds, ctf_id_t id, size_t stroffset) { dw2_asm_output_data (4, ds.name_offset + stroffset, - "TYPE %lu BTF_KIND_DATASEC '%s'", + "TYPE %" PRIu64 " BTF_KIND_DATASEC '%s'", btf_absolute_datasec_id (id), ds.name); dw2_asm_output_data (4, BTF_TYPE_INFO (BTF_KIND_DATASEC, 0, ds.entries.length ()),