Message ID | e76ef8f7-72b9-5103-cb43-9608af01d017@suse.com |
---|---|
State | Accepted, archived |
Headers |
Return-Path: <binutils-bounces+ouuuleilei=gmail.com@sourceware.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:4ac7:0:0:0:0:0 with SMTP id y7csp396007wrs; Fri, 30 Sep 2022 02:43:21 -0700 (PDT) X-Google-Smtp-Source: AMsMyM4mp/Sz2HxkMqf3LsYq5TGpx9R591XuI8SgAAoqVpV0y0IC/pm79WNasCNI68LdH6HgnEaz X-Received: by 2002:a17:906:8b81:b0:77e:cd92:9d with SMTP id nr1-20020a1709068b8100b0077ecd92009dmr5829489ejc.484.1664531001602; Fri, 30 Sep 2022 02:43:21 -0700 (PDT) Received: from sourceware.org (ip-8-43-85-97.sourceware.org. [8.43.85.97]) by mx.google.com with ESMTPS id y44-20020a50bb2f000000b0043e5ca9a0e2si1520894ede.628.2022.09.30.02.43.21 for <ouuuleilei@gmail.com> (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 30 Sep 2022 02:43:21 -0700 (PDT) Received-SPF: pass (google.com: domain of binutils-bounces+ouuuleilei=gmail.com@sourceware.org designates 8.43.85.97 as permitted sender) client-ip=8.43.85.97; Authentication-Results: mx.google.com; dkim=pass header.i=@sourceware.org header.s=default header.b=FCot9EpQ; arc=fail (signature failed); spf=pass (google.com: domain of binutils-bounces+ouuuleilei=gmail.com@sourceware.org designates 8.43.85.97 as permitted sender) smtp.mailfrom="binutils-bounces+ouuuleilei=gmail.com@sourceware.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=sourceware.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 81422385C332 for <ouuuleilei@gmail.com>; Fri, 30 Sep 2022 09:43:20 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 81422385C332 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1664531000; bh=ORYhNpxbTgv7JgzgldnHk/dGhdNsV80Pjq8Ix08O8ts=; h=Date:Subject:To:References:In-Reply-To:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To: From; b=FCot9EpQoFqvocWxLhEQ9p6RRC4XNZSAzD+x2D8fPQZTsD/r5O/n00xJ+s78jnHq+ 1ygSeIL7L5MmTX4jbeK8VIUcVSpbwCf00Y/7M7BWN2piZw7mCWonLJdKw4pXxVsYIa M7OY/Nbd4S/WBG0r8p+C7PeeNqH1b1wM4Bi/jTJY= X-Original-To: binutils@sourceware.org Delivered-To: binutils@sourceware.org Received: from EUR05-DB8-obe.outbound.protection.outlook.com (mail-db8eur05on2072.outbound.protection.outlook.com [40.107.20.72]) by sourceware.org (Postfix) with ESMTPS id 757583854803 for <binutils@sourceware.org>; Fri, 30 Sep 2022 09:42:52 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 757583854803 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=OUC4dIaf29AbP/wCUNcr9Xd6yQvOUvrGRjLYVJ+bbKh5I5BBx/WOffyTEEcyEm+v4BXHAq3Zg/ABpkobPeN/s9t069M9KMrct84/RP7YPNJlrChvuL/A3vHKMYcjLRpgJ0zL4P78Dt3H//cDdpxiF9HJv2xxSN/E/jlyqFlNZPhGPlsCmfbq1cBWmQHFPlYKq75sHrgTq+94uyb4nptG1l3S5lP32t/fp9D1zfDMwRZ0TyhQ4YfeiLC/N+nTHVCux/qlpBWH+chhzx6DGU8ajckRGnMUtuDARnB61ROo+NJuMir2k9QDR0sFvGa4/NoOBK1nC0yYOUjmFFgqfdBDEQ== 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=ORYhNpxbTgv7JgzgldnHk/dGhdNsV80Pjq8Ix08O8ts=; b=kwOvtQkxJuuMEFB/td3l0AX7ktYbwcXtOmdXU5mtL/S8xmMmu08yLALIY76iAsD38E1CjXGslFU7eLYst08T3kbxqMXVLpj5sIKpJ9Fuy6TloxgmPY/Sk92JO9PjKUAzX7DA53fP2SArokhfFKoS4n5xUEIz1u6LLGek7POKkisl6NQu1Kd9fBqHXz4S/3u5Zca0eEpwMg/aS9ckik/3FWa/YxXXzmtXQZKXxohbyiKwREr8tSbrWpQJ0BpkYRJ7+Lud99vTdjz3FChtOydBnobv38D8a4ybhsFesnyeVAllLaeReXbV1ia73Bq+bSPtwv9eKm9mZgF8PEuP7cGPug== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=suse.com; dmarc=pass action=none header.from=suse.com; dkim=pass header.d=suse.com; arc=none Received: from VE1PR04MB6560.eurprd04.prod.outlook.com (2603:10a6:803:122::25) by AM8PR04MB7795.eurprd04.prod.outlook.com (2603:10a6:20b:24f::15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5676.23; Fri, 30 Sep 2022 09:42:50 +0000 Received: from VE1PR04MB6560.eurprd04.prod.outlook.com ([fe80::2459:15ae:e6cb:218a]) by VE1PR04MB6560.eurprd04.prod.outlook.com ([fe80::2459:15ae:e6cb:218a%7]) with mapi id 15.20.5676.023; Fri, 30 Sep 2022 09:42:50 +0000 Message-ID: <e76ef8f7-72b9-5103-cb43-9608af01d017@suse.com> Date: Fri, 30 Sep 2022 11:42:50 +0200 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101 Thunderbird/102.3.0 Subject: [PATCH] RISC-V: don't cast expressions' X_add_number to long in diagnostics To: Binutils <binutils@sourceware.org> References: <7cb92a0b-d1ef-e3db-4773-0b6cd5183272@suse.com> Content-Language: en-US In-Reply-To: <7cb92a0b-d1ef-e3db-4773-0b6cd5183272@suse.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-ClientProxiedBy: FR3P281CA0137.DEUP281.PROD.OUTLOOK.COM (2603:10a6:d10:95::11) To VE1PR04MB6560.eurprd04.prod.outlook.com (2603:10a6:803:122::25) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: VE1PR04MB6560:EE_|AM8PR04MB7795:EE_ X-MS-Office365-Filtering-Correlation-Id: 7b80b573-a80c-4f6e-7b13-08daa2c823df X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: B0vqRzvCxMW6MBKFp3kzV9tq2CWf/y2AeqS3M+9GScQZPTzwhH1EHXa43IX9dXRD3y09fWwNcdzpK18Zw+6SPBtVj+zMDB2AvZdlCXvqj980/mQRHTk81nH/6hgB1egwZnzDj3vTRiN0cC5n2Qt599yoPEG60c29GVqQN59BkVyUB/BGug8uUqsaD061us3GmFEtnMnFxuN0uuEi1Mv03q3wwAIxwMJZciqBBMgGV7fn/1TfHPIGcZHvyo5at3kK+w3S50sV40rTm7dSB4HIZhhlDTVYkpahPYYxp8/Kq2L6AjnC+IiVPD664NhUuPGqmYZ3w8fZnSYfLeq/pyAiiaU4EF6PcukCziLWBHvqN/81msi4EBeIWD8/Kt+AVfjqsRzRfImgkK1MoAZMy/9zx4tDTWitrSVQoh82/zLOnVbitvMr9Qi/UU8FyJYXQG1Z4nC8DBpfsmVVFFCZ4NxfvetxxTiUxfB1U0YjoqIIc/QWQo72fl7Wx010nlcW1kklphchLRvuqeicGp8ovScp4SLpG2fe1+udwsbR6SHXvE+Zv5qDBl+PhfsOz2wRFFKAd2KmeFquIdhiDqNT49MbAi+OtHjWMaXT1iL8n8fDSBexrH4TYnCBNygIfbVncyU0EJo1BIqLYMFGTxXq1KrAs/eLOB64W2mZRUScH2e04kPlVORAPhJGqJW9g/3KpzCue0FsJvGxYqABU9ZLWBNHl/zxNzVB7PUGSCgNyT/kOMvLhyZWe7HLbGucZeSnvwnjvgKC4oY/oVm2j7jlBXgxm9atVTY8POkSbdNUrZddSN0= X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:VE1PR04MB6560.eurprd04.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230022)(136003)(366004)(396003)(39860400002)(346002)(376002)(451199015)(83380400001)(2906002)(186003)(2616005)(86362001)(31696002)(36756003)(38100700002)(31686004)(66556008)(66476007)(66946007)(6486002)(316002)(54906003)(478600001)(6506007)(41300700001)(6916009)(26005)(4744005)(6512007)(8936002)(5660300002)(4326008)(8676002)(43740500002)(45980500001); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?q?LBD0sKrbDLxtfW9RBzI8mIegIKdH?= =?utf-8?q?DIDk4j6JZKzfha7KRR+DntQZvuEb2GjakkZNVYxfbbktDsBnXQfCoahsdwasalcc0?= =?utf-8?q?xdVTwK96Snbe0cWTW0/AmWBcD09o6ZTuBnxHTHohM21uKuL97m5l21CaTyPFceCI2?= =?utf-8?q?ompxbn7KdvORc5GKJCkgM3usaMfM44swP1EFfihAPQ80aThrBTok3xi5jldhmpyK8?= =?utf-8?q?POCf5HpEJKmfGkgjWOJPyAb+YhZgHVjbshKXUp3e/o8dgCLgMOaD6x8ToJwmU6WtE?= =?utf-8?q?kfHffK6qMuI3mJ9lMMOTJavwAuzKACqdSI4ZAs9klZJzUNDlETpKKwdCiGQsXaypG?= =?utf-8?q?DKWhvDNCD1iLJiC/L7/mtLdCEXskjhhXByRUgGgWCEV9is0VobKnZ1ElrhW6+G+KG?= =?utf-8?q?KQzbTWv/aq4yUUV3KiZ4m3OFJ4xCb5eyAhn9HEP4gZPHOb81kxsBu5ggKjCo6b79s?= =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G4op9kKY?= =?utf-8?q?Y+ggD//XvJpfz7Nisqc7ZqXn6neE0XccN5D3HAe3PD+16wyX4lYb0nQ95TO/Upv01?= =?utf-8?q?hIFREJpepjxJwNQeJ8oCn0c9rMnEOD0NzDfFPbMQRL3jn6sOorymiE2wUv8mHH2sg?= =?utf-8?q?dgQ6x0xFMlPbxV4UhWTaKGUD8pM6MmelDUOwPq3zYGs1J0e9ZXY013aEIEUA4BQpK?= =?utf-8?q?YNoOKAmd2kEt?= X-OriginatorOrg: suse.com X-MS-Exchange-CrossTenant-Network-Message-Id: 7b80b573-a80c-4f6e-7b13-08daa2c823df X-MS-Exchange-CrossTenant-AuthSource: VE1PR04MB6560.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 30 Sep 2022 09:42:50.6291 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: f7a17af6-1c5c-4a36-aa8b-f5be247aa4ba X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: xHS/zPVC11q1baPSNGKFFwAhIZ4c1kdsERjjpTZUlym5g4tSadSl+rXl/F8Nk7SKur29PUwVUvHanZExvFN8gw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM8PR04MB7795 X-Spam-Status: No, score=-3030.0 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2, SPF_HELO_PASS, SPF_PASS, TXREP 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: binutils@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Binutils mailing list <binutils.sourceware.org> List-Unsubscribe: <https://sourceware.org/mailman/options/binutils>, <mailto:binutils-request@sourceware.org?subject=unsubscribe> List-Archive: <https://sourceware.org/pipermail/binutils/> List-Post: <mailto:binutils@sourceware.org> List-Help: <mailto:binutils-request@sourceware.org?subject=help> List-Subscribe: <https://sourceware.org/mailman/listinfo/binutils>, <mailto:binutils-request@sourceware.org?subject=subscribe> From: Jan Beulich via Binutils <binutils@sourceware.org> Reply-To: Jan Beulich <jbeulich@suse.com> Errors-To: binutils-bounces+ouuuleilei=gmail.com@sourceware.org Sender: "Binutils" <binutils-bounces+ouuuleilei=gmail.com@sourceware.org> X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-LABELS: =?utf-8?b?IlxcSW1wb3J0YW50Ig==?= X-GMAIL-THRID: =?utf-8?q?1745387259299816294?= X-GMAIL-MSGID: =?utf-8?q?1745387259299816294?= |
Series |
RISC-V: don't cast expressions' X_add_number to long in diagnostics
|
|
Checks
Context | Check | Description |
---|---|---|
snail/binutils-gdb-check | success | Github commit url |
Commit Message
Jan Beulich
Sept. 30, 2022, 9:42 a.m. UTC
There's no need for such workarounds anymore now that we use C99 uniformly. This addresses several testsuite failures encountered when (cross-)building on a 32-bit host.
Comments
Hi Jan, Thanks for pointing that out! I admit, that I was just following the established pattern in this file. There are four more identical cases in this file ("improper "... outputs). I'll take care of them (unless you pick them up as well). Tested-by: Christoph Müllner <christoph.muellner@vrull.eu> Thanks, Christoph On Fri, Sep 30, 2022 at 11:42 AM Jan Beulich <jbeulich@suse.com> wrote: > There's no need for such workarounds anymore now that we use C99 > uniformly. This addresses several testsuite failures encountered when > (cross-)building on a 32-bit host. > > --- a/gas/config/tc-riscv.c > +++ b/gas/config/tc-riscv.c > @@ -3338,14 +3338,14 @@ riscv_ip (char *str, struct riscv_cl_ins > if (!sign) > { > if (!VALIDATE_U_IMM (imm_expr->X_add_number, n)) > - as_bad (_("improper immediate value (%lu)"), > - (unsigned long) > imm_expr->X_add_number); > + as_bad (_("improper immediate value > (%"PRIu64")"), > + imm_expr->X_add_number); > } > else > { > if (!VALIDATE_S_IMM (imm_expr->X_add_number, n)) > - as_bad (_("improper immediate value (%li)"), > - (long) imm_expr->X_add_number); > + as_bad (_("improper immediate value > (%"PRIi64")"), > + imm_expr->X_add_number); > } > INSERT_IMM (n, s, *ip, imm_expr->X_add_number); > imm_expr->X_op = O_absent; >
Thanks, please commit. Nelson On Fri, Sep 30, 2022 at 5:42 PM Jan Beulich <jbeulich@suse.com> wrote: > > There's no need for such workarounds anymore now that we use C99 > uniformly. This addresses several testsuite failures encountered when > (cross-)building on a 32-bit host. > > --- a/gas/config/tc-riscv.c > +++ b/gas/config/tc-riscv.c > @@ -3338,14 +3338,14 @@ riscv_ip (char *str, struct riscv_cl_ins > if (!sign) > { > if (!VALIDATE_U_IMM (imm_expr->X_add_number, n)) > - as_bad (_("improper immediate value (%lu)"), > - (unsigned long) imm_expr->X_add_number); > + as_bad (_("improper immediate value (%"PRIu64")"), > + imm_expr->X_add_number); > } > else > { > if (!VALIDATE_S_IMM (imm_expr->X_add_number, n)) > - as_bad (_("improper immediate value (%li)"), > - (long) imm_expr->X_add_number); > + as_bad (_("improper immediate value (%"PRIi64")"), > + imm_expr->X_add_number); > } > INSERT_IMM (n, s, *ip, imm_expr->X_add_number); > imm_expr->X_op = O_absent;
--- a/gas/config/tc-riscv.c +++ b/gas/config/tc-riscv.c @@ -3338,14 +3338,14 @@ riscv_ip (char *str, struct riscv_cl_ins if (!sign) { if (!VALIDATE_U_IMM (imm_expr->X_add_number, n)) - as_bad (_("improper immediate value (%lu)"), - (unsigned long) imm_expr->X_add_number); + as_bad (_("improper immediate value (%"PRIu64")"), + imm_expr->X_add_number); } else { if (!VALIDATE_S_IMM (imm_expr->X_add_number, n)) - as_bad (_("improper immediate value (%li)"), - (long) imm_expr->X_add_number); + as_bad (_("improper immediate value (%"PRIi64")"), + imm_expr->X_add_number); } INSERT_IMM (n, s, *ip, imm_expr->X_add_number); imm_expr->X_op = O_absent;