From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-ej1-x630.google.com (mail-ej1-x630.google.com [IPv6:2a00:1450:4864:20::630]) by sourceware.org (Postfix) with ESMTPS id 87EC73858D1E for ; Fri, 30 Sep 2022 10:13:28 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 87EC73858D1E Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=vrull.eu Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=vrull.eu Received: by mail-ej1-x630.google.com with SMTP id b2so8052891eja.6 for ; Fri, 30 Sep 2022 03:13:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=vrull.eu; s=google; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date; bh=eSahtWfO1JjNbrUa3+A8Nbr7/ZAy84WxZ6F3ry72Tio=; b=l/Pugz7X+ZYCWyh8SYv68xwl54EX964SJvfBqiY4davIoF6sm78sEsWNbm+xSdYPU5 M/dxq2PML+QtPGGAmsW2h1rGGh1I88oAzqCF8dofgOBIqQQnDWpVYIE+AuctJMImga3o rbF3fjDg/b3ZBKAakVaFEWqQQScRFJqG4GYJkG5R5HD3RMgj1d3lJHblipT8K2mloxdI talliNTI6k4Ybi769aTzV4EK96GayJnaXuuFEcryqrFB1TFYa2TIA3iCiW6hyrML02Mc ZpjHXCF+KaY9MyihAKDAAa566ibOniZ1jCEVCoY80Gc20cuv9Gx2Ndlk8HDwGYs5DXCI Gpvw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date; bh=eSahtWfO1JjNbrUa3+A8Nbr7/ZAy84WxZ6F3ry72Tio=; b=sv0ns4flYyyYgw3lho52oUDDiPfEBWGTn0hO8WSUydIg77rJ143GlCEZISFhAzEJL4 ZRwFq8+NMU2lmn+7FDEe6TCShVR1d+yQv5pPxOkXtRqG4By3KHIyG6O87uqPM/W1xkKr NCfaJN3hhaVcZBNfH9pUdBoTOIAseohr8PbqGMMxG51hLp8J0TsL9ug7H6mqHax/N8yq q09GTUaEWWSeB/MNH375QLbtse+DRdbU0jqi3ouvVrLROwyXcK9ZWICy9ft8Hq3Q8U5f 5nrmN8asEL1OAQBdngKexjv+Z+PmmYz9so+WONww1rjGtPK0NIgONRQLUPT+nh5x+ouI kHOw== X-Gm-Message-State: ACrzQf0HCRx/tJbNu66T8RidifMkMnjD1xTmf9YNpZbbqdLf/TCV/7MC u1d5XvCY9eeMm8In98nd4x8pwaGvJ83niKelYn4JUQ== X-Google-Smtp-Source: AMsMyM6V8y98loixcsAvvbYbu0Uc/pWU2yNAAV1agUQpqBo99AKS2u8Uo5XvJlLvSFTbggDoX2wbzx/r6TVmsCW/omc= X-Received: by 2002:a17:907:2c78:b0:779:7327:c897 with SMTP id ib24-20020a1709072c7800b007797327c897mr5686043ejc.657.1664532807359; Fri, 30 Sep 2022 03:13:27 -0700 (PDT) MIME-Version: 1.0 References: <7cb92a0b-d1ef-e3db-4773-0b6cd5183272@suse.com> In-Reply-To: From: =?UTF-8?Q?Christoph_M=C3=BCllner?= Date: Fri, 30 Sep 2022 12:13:13 +0200 Message-ID: Subject: Re: [PATCH] RISC-V: don't cast expressions' X_add_number to long in diagnostics To: Jan Beulich Cc: Binutils , Palmer Dabbelt , Andrew Waterman , Jim Wilson , Nelson Chu Content-Type: multipart/alternative; boundary="000000000000b3376905e9e23e0f" X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,HTML_MESSAGE,JMQ_SPF_NEUTRAL,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS,TXREP autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: --000000000000b3376905e9e23e0f Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable 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=C3=BCllner Thanks, Christoph On Fri, Sep 30, 2022 at 11:42 AM Jan Beulich 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 =3D O_absent; > --000000000000b3376905e9e23e0f--