postgresql/src
Peter Eisentraut 63275ce84d Hardcode override of typeof_unqual for clang-for-bitcode
The fundamental problem is that when we call clang to generate
bitcode, we might be using configure results from a different
compiler, which might not be fully compatible with the clang we are
using.  In practice, clang supports most things other compilers
support, so this has apparently not been a problem in practice.

But commits 4cfce4e62c, 0af05b5dbb, and 59292f7aac have been
struggling to make typeof_unqual work in this situation.  Clang added
support in version 19, GCC in version 14, so if you are using, say,
GCC 14 and Clang 16, the compilation with the latter will fail.  Such
combinations are not very likely in practice, because GCC 14 and Clang
19 were released within a few months of each other, and so Linux
distributions are likely to have suitable combinations.  But some
buildfarm members and some Fedora versions are affected, so this tries
to fix it.

The fully correct solution would be to run a separate set of configure
tests for that clang-for-bitcode, but that would be very difficult to
implement, and probably of limited use in practice.  So the workaround
here is that we hardcodedly override the configure result under clang
based on the version number.  As long as we only have a few of these
cases, this should be manageable.

Also swap the order of the tests of typeof_unqual: Commit 59292f7aac
tested the underscore variant first, but the reasons for that are now
gone.

Reviewed-by: Jelte Fennema-Nio <postgres@jeltef.nl>
Reviewed-by: Tom Lane <tgl@sss.pgh.pa.us>
Discussion: https://www.postgresql.org/message-id/flat/92f9750f-c7f6-42d8-9a4a-85a3cbe808f3%40eisentraut.org
2026-03-16 19:24:49 +01:00
..
backend Reduce header inclusions via execnodes.h 2026-03-16 14:34:57 +01:00
bin pg_dumpall: Fix handling of incompatible options. 2026-03-16 11:01:20 -05:00
common Don't include wait_event.h in pgstat.h 2026-03-06 16:24:58 +01:00
fe_utils SQL Property Graph Queries (SQL/PGQ) 2026-03-16 10:14:18 +01:00
include Hardcode override of typeof_unqual for clang-for-bitcode 2026-03-16 19:24:49 +01:00
interfaces Prevent -Wstrict-prototypes and -Wold-style-definition warnings 2026-03-16 10:53:24 +01:00
makefiles Restore AIX support. 2026-02-23 13:34:22 -05:00
pl Reduce header inclusions via execnodes.h 2026-03-16 14:34:57 +01:00
port Check for memset_explicit() and explicit_memset() 2026-03-02 07:51:19 +01:00
template Switch the semaphore API on Solaris to unnamed POSIX. 2026-03-14 14:10:32 -04:00
test Make some tests more stable by adding more explicit ordering 2026-03-16 16:24:22 +01:00
timezone Use fallthrough attribute instead of comment 2026-02-19 08:51:12 +01:00
tools SQL Property Graph Queries (SQL/PGQ) 2026-03-16 10:14:18 +01:00
tutorial Force standard_conforming_strings to always be ON. 2026-01-21 15:08:38 -05:00
.gitignore
DEVELOPERS
Makefile Remove distprep 2023-11-06 15:18:04 +01:00
Makefile.global.in tests: Add a test C++ extension module 2026-01-20 16:42:30 +01:00
Makefile.shlib Restore AIX support. 2026-02-23 13:34:22 -05:00
meson.build Update copyright for 2026 2026-01-01 13:24:10 -05:00
nls-global.mk Fix update-po for the PGXS case 2025-10-16 20:21:05 +02:00