From: Tom Lane <tgl@sss.pgh.pa.us>
To: Peter Eisentraut <peter@eisentraut.org>
Cc: Melanie Plageman <melanieplageman@gmail.com>
Cc: pgsql-committers@lists.postgresql.org
Subject: Re: pgsql: Make typeof and typeof_unqual fallback definitions work on C++11
Date: Sun, 15 Mar 2026 14:05:06 -0400
Message-ID: <2055744.1773597906@sss.pgh.pa.us> (raw)
In-Reply-To: <2018118.1773591338@sss.pgh.pa.us>
References: <E1w1fGs-000Eon-0O@gemulon.postgresql.org>
<CAAKRu_YBRnM0VuREmBL7coMBG4z016qhVS_usBH4FeVkAETc1g@mail.gmail.com>
<2018118.1773591338@sss.pgh.pa.us>
I wrote:
> Doesn't appear to have satisfied any of the previously-broken animals
> either. It looks like the C compiler is okay but building bitcode
> with clang is not okay. We're really going to need separate
> definitions for the two cases.
After noting that ladybug is one of the failing animals, I was
able to reproduce the failure locally on a Fedora 40 installation.
This system has
$ gcc --version
gcc (GCC) 14.2.1 20240912 (Red Hat 14.2.1-3)
$ g++ --version
g++ (GCC) 14.2.1 20240912 (Red Hat 14.2.1-3)
$ clang --version
clang version 18.1.8 (Fedora 18.1.8-2.fc40)
So far as I can tell, this version of clang does not recognize
__typeof_unqual__ at all. It will take typeof_unqual, but only
with -std=c23 which we are not passing it. So the short answer
is that this is not good enough:
We test the underscore variant first so that there is a higher chance
that clang used for bitcode also supports it, since we don't test that
separately.
We could get away with not checking clang separately as long as
we weren't using any bleeding-edge C features, but this patch
is trying to do exactly that. I think we are going to have to
explicitly check all three of CC, CXX, CLANG and cope with the
case that they're all different on this point.
regards, tom lane
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: tgl@sss.pgh.pa.us, peter@eisentraut.org, melanieplageman@gmail.com, pgsql-committers@lists.postgresql.org
Subject: Re: pgsql: Make typeof and typeof_unqual fallback definitions work on C++11
In-Reply-To: <2055744.1773597906@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