Re: Change copyObject() to use typeof_unqual

From: "Jelte Fennema-Nio" <postgres(at)jeltef(dot)nl>
To: "Peter Eisentraut" <peter(at)eisentraut(dot)org>
Cc: "pgsql-hackers" <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Change copyObject() to use typeof_unqual
Date: 2026-03-15 21:54:04
Message-ID: DH3OUTBIFWX0.2SOLV96RA95I9@jeltef.nl
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Fri, 13 Mar 2026 at 11:43, Peter Eisentraut <peter(at)eisentraut(dot)org> wrote:
> There is a failure on buildfarm member taipan because it uses an unusual
> combination of gcc and clang (the gcc is much newer than clang). The
> only sensible workaround I could think of is a hardcoded override based
> on the clang version, as in the attached patch.

If we can then start prefering typeof_unqual over __typeof_unqual__ in
the configure check for CC, then I think I like this as a workaround.

If not, then I'm starting to think that actually checking support for
this feature for CLANG is probably easier to understand (and less
fragile) than combining all of these tricks together. Attached is a
patch to do so.

This only does it for CLANG, not for CLANG compiling C++ files.
Theoretically that could be necessary, but I couldn't find a C++
compiler that supports any spelling of typeof_unqual. So I'm not even
sure we need the current CXX check for typeof_unqual, I think we could
remove that too and always use the fallback.

> And alternative is that
> we decide that we don't want to support this combination, meaning that
> we would effectively require that clang is approximately as-old-or-newer
> than gcc.

Given that Tom seems to have reproduced this on Fedora 40, it sounds
like we should fix it.

Attachment Content-Type Size
v1-0001-Check-CLANG-for-typeof_unqual.patch text/x-patch 8.9 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2026-03-15 22:06:33 Re: Save a few bytes per CatCTup
Previous Message Jeff Davis 2026-03-15 21:11:53 Re: Expanding HOT updates for expression and partial indexes