From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-oo1-xc2c.google.com (mail-oo1-xc2c.google.com [IPv6:2607:f8b0:4864:20::c2c]) by sourceware.org (Postfix) with ESMTPS id 590103858C98 for ; Mon, 12 Feb 2024 16:07:34 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 590103858C98 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=gmail.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 590103858C98 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=2607:f8b0:4864:20::c2c ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1707754056; cv=none; b=uf04G1Csq7WN9AApJIJKxy1JNrba7/5OEQSn1g1x3MKKyKZysz/l7SuWWbjg/OGCLF4LMNdfeII2KnuLptn1JEHapUPEfJ7K/DKqUJfnZErCj1POKge11CwDdaUfg15busEB5U5Sx4NVo1vcHtqDTDgF9748gmWWY3qMheWNSTo= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1707754056; c=relaxed/simple; bh=phmSLkhFJNdahhXiRcWR8rp/lDy8rjHppl/1ePrNAuU=; h=DKIM-Signature:Message-ID:Date:MIME-Version:Subject:To:From; b=A650+/Vj0VqNrT8Rds/YN8xpBSNU4X8StwAUoN8U1kqBjdP2S0SX23NayaCxgnomunkmF2I21smPkEtJPEPfokSwExUibTG4K+Xv9E3eZKwOiTiLhXWuszbYKdCKJrRJV2hyh2cmzvpV3Co7MlQ913OhazCqm17LN+ZQtfT8nqE= ARC-Authentication-Results: i=1; server2.sourceware.org Received: by mail-oo1-xc2c.google.com with SMTP id 006d021491bc7-59a8ee08c23so1242232eaf.2 for ; Mon, 12 Feb 2024 08:07:34 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1707754053; x=1708358853; darn=gcc.gnu.org; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=uoH923H26QkRZ4TV4fnY/4NlLQWnQl/mPgm4GnbvDN4=; b=BU+uTzX0l5nbJYh1Kroq9q+43hgdMO0sjM++zw/CrM1oHeVSr9l2UejBWBt8pXVqXB ECiSCz0dSKjWLXUpqJWM1vNzXRmMKEcxyhAym5YNIpzUltDmKcLIrUOW9T5qV4lnKpec on7+3PP5iTpDY/bWu9Dcyo4PqmIIsHsv/6gYXe490Ve8hQMERVXxbuzvg/b/jfF/8QRv hnNV0R4kHP3obzZBB74XGHWH7KHBU6bA0HZ1wLrRpyGGcze7GtT9SSIXk7dsl5xt4YzL eWJll5aiCEDVTjarp3+YkiiXYw7BGaSJ5KGCWbgwZ8hNVRPVzn3iJvD19Dm4/L62HOJL qRIw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1707754053; x=1708358853; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=uoH923H26QkRZ4TV4fnY/4NlLQWnQl/mPgm4GnbvDN4=; b=uEhkHAEVhdRipz34RKDXtBF10WaMltB82mVYs5+mf4RWdSIXI9wbobmlKlWsr85sB7 qackqkLjyWHnoGBqcnac8iC7BjfKJe600drW8pzyfP6NgQAYJ1AkSN1WpkK+ZoRN/CxH gm0geGbfRC9Fu+X8XPTeUq4Scs5doWi7MzpCL9AIahqJNE5U1WJ/jqiJ5PZeqWyi+mKR 6aP9rkcGb5eKq3vVD2Nw1kskiStqq/I9jH1DsNkjDR/Ui2TB/5CRpHzO+e3kML65foyy Z46zNtiYGd3h0YiFZLPPFeOnjFuse/s7UeU2W6habxvsowpVz64PawqkDmYo+BXVHi5k i0PQ== X-Gm-Message-State: AOJu0YyqURyNIikc3/oH2zVqIJ5iQ3eEEmVv0dDAkc38JRIfTk9FPHJk Hywu/iRuNUsGPQTD+fKDfDSxc/PG2A0POJcXjP/dCWCos7Cc8v+9 X-Google-Smtp-Source: AGHT+IECQJROTqKARyiRIjoagXcHhD0EWLr7VPJpz3G/AEInciOYAMre5bCKxv3AF4liVBLxQpM2tg== X-Received: by 2002:a4a:9d1a:0:b0:59a:57ba:b68e with SMTP id w26-20020a4a9d1a000000b0059a57bab68emr5396332ooj.1.1707754053524; Mon, 12 Feb 2024 08:07:33 -0800 (PST) X-Forwarded-Encrypted: i=1; AJvYcCV/X2Bc/1cL2KaWqvSCYZW0XZz7rD9RPRVMHiwlFgg3dh2Kxv5SnB/zcuXH1EUSWXL8/DLlVA0r8vyTX9QEaM1SiwnJOJ+IUTAMxDuXxysJSuCH8jsHPw== Received: from [172.31.0.109] ([136.36.72.243]) by smtp.gmail.com with ESMTPSA id v8-20020a4a2448000000b0059d3a00e1e5sm108064oov.12.2024.02.12.08.07.32 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 12 Feb 2024 08:07:33 -0800 (PST) Message-ID: <6eba3b9a-fa1b-41cd-9787-93e63ff1f9df@gmail.com> Date: Mon, 12 Feb 2024 09:07:31 -0700 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: Patch ping Content-Language: en-US To: Jakub Jelinek , Richard Biener , Vladimir Makarov Cc: gcc-patches@gcc.gnu.org References: From: Jeff Law In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-2.4 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,KAM_SHORT,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS,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 List-Id: On 2/9/24 02:44, Jakub Jelinek wrote: > > https://gcc.gnu.org/pipermail/gcc-patches/2024-February/644701.html > Introduce HOST_SIZE_T_PRINT_UNSIGNED etc. macros to fix LLP64 host build issue > > Both have been successfully bootstrapped/regtested on x86_64-linux and > i686-linux, the latter has been tested by Jonathan on Windows too. > The alternative is start using %zu (AFAIK we only do that in libgccjit which > isn't supported everywhere and while it is C99, not sure if all supported > host C libraries support it), or change ira-conflicts.cc to > --- gcc/ira-conflicts.cc 2024-02-01 21:03:57.339193085 +0100 > +++ gcc/ira-conflicts.cc 2024-02-09 10:41:39.201150644 +0100 > @@ -151,8 +151,8 @@ build_conflict_bit_table (void) > fprintf > (ira_dump_file, > "+++Allocating %ld bytes for conflict table (uncompressed size %ld)\n", > - (long) allocated_words_num * sizeof (IRA_INT_TYPE), > - (long) object_set_words * ira_objects_num * sizeof (IRA_INT_TYPE)); > + (long) (allocated_words_num * sizeof (IRA_INT_TYPE)), > + (long) (object_set_words * ira_objects_num * sizeof (IRA_INT_TYPE))); > > objects_live = sparseset_alloc (ira_objects_num); > for (i = 0; i < ira_max_point; i++) > Note, we have many more cases where we use %ld or %lu to print > size_t values (ideally %zd/%zu if we can assume it on all hosts, or > with the above introduced HOST_SIZE_T_PRINT*, the problem with the > %ld/%lu and casts is that it truncates the values on LLP64 hosts (aka > %Windows). While I'd love to be able to use %z, I suspect it's going to be problematical. That's one of the cleanups I need to have Mariam do on the CRC code which uses %z extensively in its debugging dumps. So let's assume %z is a no-go for now. Having a HOST_SIZE_T_PRINT_UNSIGNED seems useful, so I'd tend to prefer we go with that solution from the URL above rather than just throwing some parens around the expression before casting the result to "long". jeff