Re: Change copyObject() to use typeof_unqual
Jelte Fennema <postgres@jeltef.nl>
From: "Jelte Fennema-Nio" <postgres@jeltef.nl>
To: "Peter Eisentraut" <peter@eisentraut.org>
Cc: "pgsql-hackers" <pgsql-hackers@postgresql.org>
Date: 2026-03-15T21:54:04Z
Lists: pgsql-hackers
Attachments
- v1-0001-Check-CLANG-for-typeof_unqual.patch (text/x-patch) patch v1-0001
On Fri, 13 Mar 2026 at 11:43, Peter Eisentraut <peter@eisentraut.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.
Commits
Same data as JSON:
GET /api/v1/messages/:b64id/commits
the thread's linked commits as JSON, with link sources.
API reference →
-
Add some const qualifiers enabled by typeof_unqual change on copyObject
- 7724cb9935a9 19 (unreleased) landed
-
Hardcode typeof_unqual to __typeof_unqual__ for clang
- 2eb6cd327cae 19 (unreleased) landed
-
Clean up postgres_fdw/t/010_subscription.pl.
- f4af7849b3db 19 (unreleased) cited
-
Hardcode override of typeof_unqual for clang-for-bitcode
- 63275ce84d2f 19 (unreleased) landed
-
Make typeof and typeof_unqual fallback definitions work on C++11
- cd083b54bd67 19 (unreleased) landed
-
Change copyObject() to use typeof_unqual
- 59292f7aac72 19 (unreleased) landed
- 4cfce4e62c8f 19 (unreleased) landed
-
Fixes for C++ typeof implementation
- 9c05f152b5dd 19 (unreleased) landed
-
Support using copyObject in standard C++
- 1887d822f142 19 (unreleased) cited