pgsql-hackers
❮
warning under gcc 16.1.0
- Jump to comment-1Erik Rijkers<er@xs4all.nl>Apr 30, 2026, 8:52 PM UTCCompiling with gcc 16.1.0 gives the following warning and notes:
(horizontally compressed a bit te avoid excessive wrapping)
clauses.c: In function ‘recheckcastfunction_args.isra’:
clauses.c:5139:19: warning: ‘actualargtypes’ may be used uninitialized [-Wmaybe-uninitialized]5139 | rettype = enforce_generic_type_consistency(actual_arg_types,| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~5140 | declared_arg_types,| ~~~~~~~~~~~~~~~~~~~5141 | nargs,| ~~~~~~5142 | funcform->prorettype,| ~~~~~~~~~~~~~~~~~~~~~5143 | false);
In file included from clauses.c:46:| ~~~~~~
../../../../src/include/parser/parsecoerce.h:85:17: note: by argument 1 of type ‘const Oid *’ {aka ‘const unsigned int *’} to ‘enforcegenerictypeconsistency’ declared here85 | extern Oid enforce_generic_type_consistency(const Oid *actual_arg_types,
clauses.c:5125:33: note: ‘actualargtypes’ declared here| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~5125 | Oid actual_arg_types[FUNC_MAX_ARGS];
HTH,| ^~~~~~~~~~~~~~~~
Erik- Jump to comment-1Tom Lane<tgl@sss.pgh.pa.us>Apr 30, 2026, 9:21 PM UTCErik Rijkers <er@xs4all.nl> writes:
Compiling with gcc 16.1.0 gives the following warning and notes:
(horizontally compressed a bit te avoid excessive wrapping)clauses.c: In function ‘recheckcastfunction_args.isra’:
I'm inclined to write that off as "buggy early-version compiler".
clauses.c:5139:19: warning: ‘actualargtypes’ may be used uninitialized
[-Wmaybe-uninitialized]
That code is visibly okay, and no other compiler version has warned
about it.regards, tom lane