From: Peter Eisentraut <peter@eisentraut.org>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Fixes for C++ typeof implementation
Date: Wed, 11 Mar 2026 11:00:19 +0000
Message-ID: <E1w0HIZ-003SH4-1s@gemulon.postgresql.org> (raw)
Fixes for C++ typeof implementation
This fixes two bugs in commit 1887d822f14.
First, if we are using the fallback C++ implementation of typeof, then
we need to include the C++ header <type_traits> for
std::remove_reference_t. This header is also likely to be used for
other C++ implementations of type tricks, so we'll put it into the
global includes.
Second, for the case that the C compiler supports typeof in a spelling
that is not "typeof" (for example, __typeof__), then we need to #undef
typeof in the C++ section to avoid warnings about duplicate macro
definitions.
Reviewed-by: Jelte Fennema-Nio <postgres@jeltef.nl>
Discussion: https://www.postgresql.org/message-id/flat/92f9750f-c7f6-42d8-9a4a-85a3cbe808f3%40eisentraut.org
Branch
------
master
Details
-------
https://git.postgresql.org/pg/commitdiff/9c05f152b5dd7aeaa6e64bd4ed2fc86bab437073
Modified Files
--------------
src/include/c.h | 9 +++++++++
1 file changed, 9 insertions(+)
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-committers@postgresql.org
Cc: peter@eisentraut.org, pgsql-committers@lists.postgresql.org
Subject: Re: pgsql: Fixes for C++ typeof implementation
In-Reply-To: <E1w0HIZ-003SH4-1s@gemulon.postgresql.org>
* 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