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 1oqwho-0001lz-8y for pgsql-hackers@arkaria.postgresql.org; Fri, 04 Nov 2022 13:25:56 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1oqwhl-00056b-Tj for pgsql-hackers@arkaria.postgresql.org; Fri, 04 Nov 2022 13:25:53 +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 1oqwhl-00056R-KY for pgsql-hackers@lists.postgresql.org; Fri, 04 Nov 2022 13:25:53 +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 1oqwhe-0002H1-I5 for pgsql-hackers@lists.postgresql.org; Fri, 04 Nov 2022 13:25:52 +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 2A4DPg0O2280954; Fri, 4 Nov 2022 09:25:42 -0400 From: Tom Lane To: David Geier cc: PostgreSQL Developers Subject: Re: Add explicit casts in four places to simplehash.h In-reply-to: <0f0d2561-1190-1f45-0c5f-ed42f2c80aaf@gmail.com> References: <2063437.1667487018@sss.pgh.pa.us> <0f0d2561-1190-1f45-0c5f-ed42f2c80aaf@gmail.com> Comments: In-reply-to David Geier message dated "Fri, 04 Nov 2022 09:23:54 +0100" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <2280952.1667568342.1@sss.pgh.pa.us> Date: Fri, 04 Nov 2022 09:25:42 -0400 Message-ID: <2280953.1667568342@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk David Geier writes: > On 11/3/22 15:50, Tom Lane wrote: >> The bigger picture here is that we do actually endeavor to keep >> (most of) our headers C++ clean, but our tool cpluspluscheck misses >> these problems because it doesn't try to use these macros. >> I wonder whether there is a way to do better. > What about having a custom header alongside cpluspluscheck which > references all macros we care about? Can't see that that would help, because of the hand maintenance required to make it useful. regards, tom lane