From patchwork Mon Feb 12 17:13:35 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jakub Jelinek X-Patchwork-Id: 199940 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7300:bc8a:b0:106:860b:bbdd with SMTP id dn10csp53985dyb; Mon, 12 Feb 2024 09:14:33 -0800 (PST) X-Google-Smtp-Source: AGHT+IFuyXV6LSJpWkYqixr2uTMACH4F0uuAC7u3hvO3WD0hWumTnBNBaiY366EvhKmn/gaw4O2+ X-Received: by 2002:a05:620a:211c:b0:784:71a6:f8df with SMTP id l28-20020a05620a211c00b0078471a6f8dfmr8516446qkl.44.1707758072959; Mon, 12 Feb 2024 09:14:32 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1707758072; cv=pass; d=google.com; s=arc-20160816; b=N6g/D7APj/PfEB3tv+PtdHnf1AtyIb0NTKTue9aynYG735nYZMHqu89Uh8cnhekwEp EC/Pl7HtsPHBp0YhmXUR9wTN3vv9BhWw6mgPKzcDV5uSM+WN20/HWV6D5gDMRAL8wwJk Jcg2hnsssWN+f2itC9/3Fx+ycy4f1bP9UN+1uut+HdKLSOFCWPkbti4WJ8ar5OUsgUvN D9lfwvllrvEZjoNQlnVFv/NMa6iVxZGstzBcXMSML2FRI8VKuMMIkOFIQhfG25levApi xoztt8DoNT7bjZb52S7ymVzcdo+dGyWPw/tYY+v0nlRskz2CCEgES6o+zpTZK94ZCZKl Vh9Q== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=errors-to:reply-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-disposition :mime-version:message-id:subject:cc:to:from:date:dkim-signature :arc-filter:dmarc-filter:delivered-to; bh=j5xSDTnmrRBgoc6ObuvwZExqiTKgaT6idF6aUE6PcyQ=; fh=GiUjFkFVKYh+OCfvuUtEmqvmb3oH6brgGoiha1EQGh0=; b=bTAj6BRcHaQq2Ok89mBqa1htEqc5I1a74pH3jDkeF9Yz16a88dVhyDgug/CkQ/C8D/ 6yWaxHyRz5UatKS2W7kD1zw/8KK37SZxybGhGU5V4vMkSpU4XXF0hh1tvSUNrhArFtMk Rcdr6AqA9VQusvIqv41nsJlLBALNYqZM6W+PxNVNzwLrqW1OryZkGAYZy997Mp9XdoGs MZYQ98Yh4GM4L7hjhFlFP85OC6I8YINqCc9Th393oUJTqkJWicdCcIBemfs+eWmG9gDm SaBj60Gzbj7+JjkLoRJ3QU4BvRBmnvyr5mCfoW6yLXPNYvK3/WjPaXTChgR80UJ0CJ7S +hvQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b="essDHF/Y"; arc=pass (i=1); spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) smtp.mailfrom="gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com X-Forwarded-Encrypted: i=2; AJvYcCVS/f7W+E0KvpMIpRSQ8q85v+byB/DtuNTc19Km3otHCqxwYn4d8an+j0HpR7mfsTV5o3HPOYCMnnVQ47tVtBK3K58kmQ== Received: from server2.sourceware.org (server2.sourceware.org. [2620:52:3:1:0:246e:9693:128c]) by mx.google.com with ESMTPS id l6-20020a05620a28c600b00787177a00d8si415702qkp.108.2024.02.12.09.14.32 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 12 Feb 2024 09:14:32 -0800 (PST) Received-SPF: pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) client-ip=2620:52:3:1:0:246e:9693:128c; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b="essDHF/Y"; arc=pass (i=1); spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) smtp.mailfrom="gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id A59A13858C41 for ; Mon, 12 Feb 2024 17:14:32 +0000 (GMT) X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by sourceware.org (Postfix) with ESMTPS id 24A253858C3A for ; Mon, 12 Feb 2024 17:13:41 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 24A253858C3A Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=redhat.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=redhat.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 24A253858C3A Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=170.10.129.124 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1707758022; cv=none; b=nowXoiixPM+1Ywen9/ClmFqEf1psJwQuXOjcfG06iLUkKSleyKAJULwTUNL6HvbwYIu3W/nkhzVdZAPpX/RXUn52IU8NrwFDG54c7DJiF2WvlkuGBwZGA3IjusMzSNOXIyicvL0+DLY4F2iN9GMRsVIhBqQjNFqx2NRhhlzKIz0= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1707758022; c=relaxed/simple; bh=8i44SYzjhbPlo9H/dV64mdLcvLv2vb/2pUHx2J+l/Nk=; h=DKIM-Signature:Date:From:To:Subject:Message-ID:MIME-Version; b=iZ/4Jk99PVMfG1JNkl5dy3Gpl6e+wK3h39S3YsfhSqEa8UrNZ1T/Pf7ZRIQXkanIctbgOv45PaKeQgL78c1LCWv5eI9JPpenjpDuuGm63veWDMRGHTxP5OIfFEZqUhlvs9oSqVHE+scIffFSmjXbexUmVWx8tGKl7uVImZdP3ck= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1707758020; h=from:from:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type; bh=j5xSDTnmrRBgoc6ObuvwZExqiTKgaT6idF6aUE6PcyQ=; b=essDHF/Y7iIW2NN6F25zBGNhvjQ+ujTHkRFo8OzaJl7QyFzIefmPHR4ZO/LaPrbpZeCuAh RERB0fyjTuWErsnWHLFpGTg7j2jROomkC1lJPS12vWVUsluiqLJkixx6d88PXTmV5cnTXS ApHMWrTbbgjroU1by9gym1tzuXFoewo= Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-121-slpvh0TYMfWKUY2LXssJRA-1; Mon, 12 Feb 2024 12:13:39 -0500 X-MC-Unique: slpvh0TYMfWKUY2LXssJRA-1 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.rdu2.redhat.com [10.11.54.2]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 1F27C862DC1; Mon, 12 Feb 2024 17:13:39 +0000 (UTC) Received: from tucnak.zalov.cz (unknown [10.39.192.8]) by smtp.corp.redhat.com (Postfix) with ESMTPS id D6E17400D5CC; Mon, 12 Feb 2024 17:13:38 +0000 (UTC) Received: from tucnak.zalov.cz (localhost [127.0.0.1]) by tucnak.zalov.cz (8.17.1/8.17.1) with ESMTPS id 41CHDahQ2671482 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NOT); Mon, 12 Feb 2024 18:13:36 +0100 Received: (from jakub@localhost) by tucnak.zalov.cz (8.17.1/8.17.1/Submit) id 41CHDZbk2671481; Mon, 12 Feb 2024 18:13:35 +0100 Date: Mon, 12 Feb 2024 18:13:35 +0100 From: Jakub Jelinek To: Richard Biener Cc: gcc-patches@gcc.gnu.org Subject: [PATCH] gengtype: Use HOST_SIZE_T_PRINT_UNSIGNED in another spot Message-ID: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.4.1 on 10.11.54.2 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Disposition: inline X-Spam-Status: No, score=-3.8 required=5.0 tests=BAYES_00, DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2, SPF_HELO_NONE, SPF_NONE, TXREP, T_SCC_BODY_TEXT_LINE 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.30 Precedence: list List-Id: Gcc-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: Jakub Jelinek Errors-To: gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1790714129106076980 X-GMAIL-MSGID: 1790714129106076980 Hi! This patch depends on the libiberty/vprintf-support.c change. Ok for trunk if that one is approved? 2024-02-12 Jakub Jelinek * gengtype.cc (adjust_field_rtx_def): Use HOST_SIZE_T_PRINT_UNSIGNED and cast to fmt_size_t instead of %lu and cast to unsigned long. Jakub --- gcc/gengtype.cc.jj 2024-02-10 11:25:10.104472494 +0100 +++ gcc/gengtype.cc 2024-02-12 10:13:49.324612173 +0100 @@ -1344,8 +1344,10 @@ adjust_field_rtx_def (type_p t, options_ } subfields = create_field (subfields, t, - xasprintf (".fld[%lu].%s", - (unsigned long) aindex, + xasprintf (".fld[" + HOST_SIZE_T_PRINT_UNSIGNED + "].%s", + (fmt_size_t) aindex, subname)); subfields->opt = nodot; if (t == note_union_tp)