From: Thomas Munro Date: Tue, 30 Dec 2025 01:11:37 +0000 (+1300) Subject: jit: Remove -Wno-deprecated-declarations in 18+. X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=dfb9ff5904074976b2a27bc44735a2680303de6d;p=thirdparty%2Fpostgresql.git jit: Remove -Wno-deprecated-declarations in 18+. REL_18_STABLE and master have commit ee485912, so they always use the newer LLVM opaque pointer functions. Drop -Wno-deprecated-declarations (commit a56e7b660) for code under jit/llvm in those branches, to catch any new deprecation warnings that arrive in future version of LLVM. Older branches continued to use functions marked deprecated in LLVM 14 and 15 (ie switched to the newer functions only for LLVM 16+), as a precaution against unforeseen compatibility problems with bitcode already shipped. In those branches, the comment about warning suppression is updated to explain that situation better. In theory we could suppress warnings only for LLVM 14 and 15 specifically, but that isn't done here. Backpatch-through: 14 Reported-by: Tom Lane Discussion: https://postgr.es/m/1407185.1766682319%40sss.pgh.pa.us --- diff --git a/src/backend/jit/llvm/Makefile b/src/backend/jit/llvm/Makefile index 6fe96e7b9c7..1c3022b6274 100644 --- a/src/backend/jit/llvm/Makefile +++ b/src/backend/jit/llvm/Makefile @@ -22,8 +22,10 @@ endif PGFILEDESC = "llvmjit - JIT using LLVM" NAME = llvmjit -# LLVM 14 produces deprecation warnings. We'll need to make some changes -# before the relevant functions are removed, but for now silence the warnings. +# Some functions called in LLVM 14 and LLVM 15 are marked with GCC deprecation +# attributes. For LLVM 16 and later, we use the newer replacement functions +# instead, but warnings are suppressed unconditionally. (Note that this is +# only done in branches before REL_18_STABLE.) ifeq ($(GCC), yes) LLVM_CFLAGS += -Wno-deprecated-declarations endif