Re: Add explicit casts in four places to simplehash.h - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Add explicit casts in four places to simplehash.h
Date
Msg-id 2063437.1667487018@sss.pgh.pa.us
Whole thread Raw
In response to Add explicit casts in four places to simplehash.h  (David Geier <geidav.pg@gmail.com>)
Responses Re: Add explicit casts in four places to simplehash.h
List pgsql-hackers
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



pgsql-hackers by date:

Previous
From: Nikita Malakhov
Date:
Subject: Re: Pluggable toaster
Next
From: Maxim Orlov
Date:
Subject: Re: Add palloc_aligned() to allow arbitrary power of 2 memory alignment