pg.ddx.io  pgsql-hackers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: David Geier <geidav.pg@gmail.com>
Cc: PostgreSQL Developers <pgsql-hackers@lists.postgresql.org>
Subject: Re: Add explicit casts in four places to simplehash.h
Date: Thu, 03 Nov 2022 10:50:18 -0400
Message-ID: <2063437.1667487018@sss.pgh.pa.us> (raw)
In-Reply-To: <aa5d88a3-71f4-3455-11cf-82de0372c941@gmail.com>
References: <aa5d88a3-71f4-3455-11cf-82de0372c941@gmail.com>

David Geier <geidav.pg@gmail.com> writes:
> What about, while not being strictly necessary for PostgreSQL itself, 
> also adding such casts to simplehash.h so that it can be used in code 
> where -Wc++-compat is enabled?

Seems reasonable, so done (I fixed one additional spot you missed).

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.

			regards, tom lane





view thread (4+ messages)  latest in thread

Message-ID: <2063437.1667487018@sss.pgh.pa.us>
Permalink:  ../2063437.1667487018@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/2063437.1667487018@sss.pgh.pa.us

 · 

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: tgl@sss.pgh.pa.us, geidav.pg@gmail.com, pgsql-hackers@lists.postgresql.org
  Subject: Re: Add explicit casts in four places to simplehash.h
  In-Reply-To: <2063437.1667487018@sss.pgh.pa.us>

* 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