pg.ddx.io  pgsql-hackers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: David Geier <geidav.pg@gmail.com>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: PostgreSQL Developers <pgsql-hackers@lists.postgresql.org>
Subject: Re: Add explicit casts in four places to simplehash.h
Date: Fri, 4 Nov 2022 09:23:54 +0100
Message-ID: <0f0d2561-1190-1f45-0c5f-ed42f2c80aaf@gmail.com> (raw)
In-Reply-To: <2063437.1667487018@sss.pgh.pa.us>
References: <aa5d88a3-71f4-3455-11cf-82de0372c941@gmail.com>
	<2063437.1667487018@sss.pgh.pa.us>

On 11/3/22 15:50, Tom Lane wrote:
> Seems reasonable, so done (I fixed one additional spot you missed).
Thanks!
> 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?
We could start with the really big macros like the ones from 
simplehash.h and add as we go.
I could give this a try if deemed useful.

--
David Geier
(ServiceNow)






view thread (4+ messages)  latest in thread

Message-ID: <0f0d2561-1190-1f45-0c5f-ed42f2c80aaf@gmail.com>
Permalink:  ../0f0d2561-1190-1f45-0c5f-ed42f2c80aaf@gmail.com/
Also on:    postgresql.org/message-id/0f0d2561-1190-1f45-0c5f-ed42f2c80aaf@gmail.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-hackers@postgresql.org
  Cc: geidav.pg@gmail.com, tgl@sss.pgh.pa.us, pgsql-hackers@lists.postgresql.org
  Subject: Re: Add explicit casts in four places to simplehash.h
  In-Reply-To: <0f0d2561-1190-1f45-0c5f-ed42f2c80aaf@gmail.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox