From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Pip Cet via "Emacs development discussions." Newsgroups: gmane.emacs.devel Subject: Re: pdumper on Solaris 10 Date: Tue, 17 Dec 2024 19:43:02 +0000 Message-ID: <87ldweayga.fsf@protonmail.com> References: <865xnrbh3r.fsf@gnu.org> <87bjxil35f.fsf@protonmail.com> <86seqqtjzb.fsf@gnu.org> <87o71ddxmf.fsf@protonmail.com> <86a5cxryfp.fsf@gnu.org> <89cba675-90e6-49d1-b774-f0498de6ac19@cs.ucla.edu> Reply-To: Pip Cet Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="40751"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Eli Zaretskii , gerd.moellmann@gmail.com, emacs-devel@gnu.org To: Paul Eggert Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Tue Dec 17 21:13:13 2024 Return-path: Envelope-to: ged-emacs-devel@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1tNdwP-000ASC-Ak for ged-emacs-devel@m.gmane-mx.org; Tue, 17 Dec 2024 21:13:13 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tNdvN-0002mq-Ca; Tue, 17 Dec 2024 15:12:09 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tNdTO-0004Bc-KS for emacs-devel@gnu.org; Tue, 17 Dec 2024 14:43:14 -0500 Original-Received: from mail-10630.protonmail.ch ([79.135.106.30]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tNdTL-0002Eh-1B for emacs-devel@gnu.org; Tue, 17 Dec 2024 14:43:14 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=protonmail.com; s=protonmail3; t=1734464587; x=1734723787; bh=7fn2ce7U+8EqFzoOhOS7SpxqrNhDP8az7+Tx07SO+AY=; h=Date:To:From:Cc:Subject:Message-ID:In-Reply-To:References: Feedback-ID:From:To:Cc:Date:Subject:Reply-To:Feedback-ID: Message-ID:BIMI-Selector:List-Unsubscribe:List-Unsubscribe-Post; b=oSnsZomtZZcgF9r8tW6lLcZaEBqLPv8kwrAaTqGcPV8hlwPxXswxILQUGkqUEfoU4 VP43htqU4fFkGiOrb2v6MkZk9dcMku3/vKXeR9JHAdo/JdJZcwsMp/qn0VkED+z7Fk yWSt6mRJJCohI/6116gSWEkpcbsFuqHsZiHQhsD8rQh9tOE2jyLb7pnO1hUfNczglD I0VvexiwZ0aiEsYRFUQotwONWCzYNsZaxR9JC2en6BXVgYPgHoG9ajIXVMHVEYTPY2 2PUpHUtqKXbPRQGl/Xv45XsPCWoyfDSEJxjnGwsMD60Bb6rJAZz1+NbogN7CyxRzyJ 9Rgz3mHBdLbYg== In-Reply-To: <89cba675-90e6-49d1-b774-f0498de6ac19@cs.ucla.edu> Feedback-ID: 112775352:user:proton X-Pm-Message-ID: d7fa0c89036d33774eaa1b8c1ca577f8171c1bad Received-SPF: pass client-ip=79.135.106.30; envelope-from=pipcet@protonmail.com; helo=mail-10630.protonmail.ch X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, RCVD_IN_VALIDITY_CERTIFIED_BLOCKED=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Mailman-Approved-At: Tue, 17 Dec 2024 15:12:07 -0500 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.devel:326614 Archived-At: "Paul Eggert" writes: > On 2024-12-15 03:13, Eli Zaretskii wrote: >>> Date: Sun, 15 Dec 2024 10:55:49 +0000 >>> From: Pip Cet >>> >>> "Eli Zaretskii" writes: >>> >>>> CC igc.o >>>> igc.c: In function 'weak_hash_table_entry': >>>> igc.c:4102:16: warning: cast to pointer from integer of different s= ize [-Wint-to-pointer-cast] >>>> 4102 | client =3D (mps_addr_t)entry.intptr; >>>> =09| ^ >>>> igc.c:4107:16: warning: cast to pointer from integer of different s= ize [-Wint-to-pointer-cast] >>>> 4107 | client =3D (mps_addr_t)real_ptr; >>>> =09| ^ > ... >>> What's the preferred way of avoiding a compiler warning in this case? >>> A simple double cast (first to uintptr_t, then to mps_addr_t) should >>> work, right? >> I'll defer to Paul (CC'ed), but my personal preference is also to >> explicitly reset the ignored bits by bitwise AND. > > The usual way I avoid such warnings is a single cast of the pointer to > uintptr_t (or to intptr_t, if the eventual destination is signed). > There is no need for two casts, or for a bitwise AND, and I usually In this case, the eventual destination is a pointer, so I don't see how a single cast would work. Changing mps_addr_t to be an integer seems a bit drastic. (The change I'm currently using does use an intermediate uintptr_t variable, but it's still two casts). Pip