Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1nY9QG-0004TU-B2 for pgsql-hackers@arkaria.postgresql.org; Sat, 26 Mar 2022 16:37:52 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1nY9QF-0007PF-7A for pgsql-hackers@arkaria.postgresql.org; Sat, 26 Mar 2022 16:37:51 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1nY9QE-0007P6-Ua for pgsql-hackers@lists.postgresql.org; Sat, 26 Mar 2022 16:37:50 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1nY9QC-0001cl-Ud for pgsql-hackers@lists.postgresql.org; Sat, 26 Mar 2022 16:37:50 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.15.2/8.15.2) with ESMTP id 22QGbi6T051679; Sat, 26 Mar 2022 12:37:44 -0400 From: Tom Lane To: Andres Freund cc: pgsql-hackers@lists.postgresql.org, Robert Haas , Thomas Munro Subject: Re: Pointer subtraction with a null pointer In-reply-to: <20220326163441.qzpcioycozbzarsf@alap3.anarazel.de> References: <48826.1648310694@sss.pgh.pa.us> <49360.1648311192@sss.pgh.pa.us> <20220326163441.qzpcioycozbzarsf@alap3.anarazel.de> Comments: In-reply-to Andres Freund message dated "Sat, 26 Mar 2022 09:34:41 -0700" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <51677.1648312664.1@sss.pgh.pa.us> Date: Sat, 26 Mar 2022 12:37:44 -0400 Message-ID: <51678.1648312664@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Andres Freund writes: > On 2022-03-26 12:13:12 -0400, Tom Lane wrote: >> This code is old, but mylodon wasn't doing that a week ago, so >> Andres must've updated the compiler and/or changed its options. > Yep, updated it to clang 13. It's a warning present in 13, but not in 12. OK, that answers that. After more thought I agree that replacing these relptr_store calls with something else would be the better solution. I'll prepare a patch. regards, tom lane