model-writtenrun 3348 - may be wrong, links go to the source messages. Commit-by-commit LLM analysis is in the Commits dialog.
- Erik Rijkers reported a GCC 12.1.0 array-bounds warning in guc_var_compare() during a non-assert build in #1, and Tom Lane initially considered it a compiler bug in #2.
- Nazir Bilal Yavuz revived the issue while testing Debian bookworm CI images, reporting that GCC 12.2.0 failed the PostgreSQL 15 compiler-warning task while PostgreSQL 16 and upstream passed in #3; after Andres Freund requested fresh reproduction details in #4, Nazir reproduced it again in #5.
- Andres Freund reproduced the warning and identified a real type mismatch in #6: the search key contains a string pointer, but the comparator treats it as a complete config_generic structure, so he proposed extracting the string pointer directly.
- Nazir Bilal Yavuz supplied the attached fix in #7, reporting that it applied to PostgreSQL 12 through 15, eliminated the warnings, and passed tests.
- Andres Freund applied the patch with light naming and const-qualification edits as 43cd30bcd1, with 9b047cc0b2 representing the same change on PostgreSQL 17; he explained in #8 that all branches warranted the correctness fix even where no warning appeared.
- Nathan Bossart supplied an inline correction for two spaces rejected by pgindent in #9, and Andres Freund agreed to fix them in the thread's final message, #10.
- The formatting correction subsequently landed as 47ecbfdfcc, completing the follow-up promised in #10; no attached work remained outstanding.