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 4cfce4e62c8, 0af05b5dbb4, and 59292f7aac7 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 59292f7aac7 tested the underscore variant first, but the reasons for that are now gone. Reviewed-by: Jelte Fennema-Nio <[email protected]> Reviewed-by: Tom Lane <[email protected]> Discussion: https://www.postgresql.org/message-id/flat/92f9750f-c7f6-42d8-9a4a-85a3cbe808f3%40eisentraut.org Branch ------ master Details ------- https://git.postgresql.org/pg/commitdiff/63275ce84d2f571136b585d7493e1ec351388014 Modified Files -------------- config/c-compiler.m4 | 8 ++------ configure | 8 ++------ meson.build | 8 ++------ src/include/c.h | 15 +++++++++++++++ 4 files changed, 21 insertions(+), 18 deletions(-)
