BUG #19485: Compilation warnings and notes with GCC 16.1.1 on new Fedora 44

From: PG Bug reporting form <noreply(at)postgresql(dot)org>
To: pgsql-bugs(at)lists(dot)postgresql(dot)org
Cc: buschmann(at)nidsa(dot)net
Subject: BUG #19485: Compilation warnings and notes with GCC 16.1.1 on new Fedora 44
Date: 2026-05-18 07:06:44
Message-ID: 19485-2b03231a775756f1@postgresql.org
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

The following bug has been logged on the website:

Bug reference: 19485
Logged by: Hans Buschmann
Email address: buschmann(at)nidsa(dot)net
PostgreSQL version: 18.4
Operating system: Fedora 44 Server x86-64
Description:

When compiling the new current minor version 18.4 on fedora with GCC 16.1.1
I stumbled over two warnings/notes:

[root(at)fedora build]# ninja
[813/2272] Compiling C object
src/backend/postgres_lib.a.p/optimizer_util_clauses.c.o
../src/backend/optimizer/util/clauses.c: In function
‘recheck_cast_function_args.isra’:
../src/backend/optimizer/util/clauses.c:4403:19: warning: ‘actual_arg_types’
may be used uninitialized [-Wmaybe-uninitialized]
4403 | rettype = enforce_generic_type_consistency(actual_arg_types,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
4404 |
declared_arg_types,
|
~~~~~~~~~~~~~~~~~~~
4405 |
nargs,
|
~~~~~~
4406 |
funcform->prorettype,
|
~~~~~~~~~~~~~~~~~~~~~
4407 |
false);
|
~~~~~~
In file included from ../src/backend/optimizer/util/clauses.c:42:
../src/include/parser/parse_coerce.h:85:17: note: by argument 1 of type
‘const Oid *’ {aka ‘const unsigned int *’} to
‘enforce_generic_type_consistency’ declared here
85 | extern Oid enforce_generic_type_consistency(const Oid
*actual_arg_types,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../src/backend/optimizer/util/clauses.c:4389:33: note: ‘actual_arg_types’
declared here
4389 | Oid actual_arg_types[FUNC_MAX_ARGS];
| ^~~~~~~~~~~~~~~~
[2272/2272] Linking target src/interfaces/ecpg/test/pg_regress_ecpg
[root(at)fedora build]#

The same occurs also with the development branch snapshot 19devel from
18.5.2026

Since I cannot attach a file here I show the summary of my meson
configuration:

meson setup build --prefix=/usr/local/pgbeta -Dpgport=5431 -Duuid=ossp

...
...
postgresql 18.4

Data layout
data block size : 8 kB
WAL block size : 8 kB
segment size : 1 GB

System
host system : linux x86_64
build system : linux x86_64

Compiler
linker : ld.bfd
C compiler : gcc 16.1.1

Compiler Flags
CPP FLAGS : -D_GNU_SOURCE
C FLAGS, functional : -fno-strict-aliasing -fwrapv
-fexcess-precision=standard
C FLAGS, warnings : -Wmissing-prototypes -Wpointer-arith
-Werror=vla -Wendif-labels -Wmissing-format-attribute
-Wimplicit-fallthrough=3 -Wcast-function-type -Wshadow=compatible-local
-Wformat-security -Wdeclaration-after-statement
-Wmissing-variable-declarations -Wno-format-truncation
-Wno-stringop-truncation
C FLAGS, modules : -fvisibility=hidden
C FLAGS, user specified:
LD FLAGS :

Programs
bison : /usr/bin/bison 3.8.2
dtrace : NO
flex : /usr/bin/flex 2.6.4

External libraries
bonjour : NO
bsd_auth : NO
docs : YES
docs_pdf : NO
gss : NO
icu : YES 77.1
ldap : NO
libcurl : NO
libnuma : YES 2.0.19
liburing : YES 2.13
libxml : YES 2.12.10
libxslt : NO
llvm : NO
lz4 : YES 1.10.0
nls : YES
openssl : YES 3.5.5
pam : NO
plperl : YES 5.42.2
plpython : YES 3.14
pltcl : NO
readline : YES 8.3
selinux : YES 3.10
systemd : YES 259
uuid : YES 1.6.2
zlib : YES 1.3.1.zlib-ng
zstd : YES 1.5.7

User defined options
pgport : 5431
prefix : /usr/local/pgbeta
uuid : ossp

Found ninja-1.13.2 at /usr/bin/ninja
#

As I am not an expert C programmer, please could somebody check the
combination of Postgres and GCC 16.1.1 to resolve this minor issue.

Only checked 18.4 and 19devel, only with GCC (not Clang), no other versions.

Thank you for looking

Hans Buschmann

Browse pgsql-bugs by date

  From Date Subject
Next Message PG Bug reporting form 2026-05-18 07:54:29 BUG #19486: Regression in SQL-language functions using XML values and IS DOCUMENT
Previous Message Andrei Lepikhov 2026-05-18 06:40:39 Re: BUG #19481: multivariate MCV expression stats not applied for equivalent predicates on nullable side of LEFT JOI