model-writtenrun 4584 - may be wrong, links go to the source messages. Commit-by-commit LLM analysis is in the Commits dialog.
- Peter Eisentraut opened this thread with a previously posted proposal to enable -fstrict-flex-arrays=1, improving bounds checking while preserving necessary one-element flexible arrays, and used an anonymous union to accommodate JsonValueList's variable-length storage without changing its base size #1.
- David Geier suggested rewriting exceptional structs or using a per-field attribute #2, but Peter considered rewriting unnecessary and explained that Clang lacked the attribute #3; after further discussion, David acknowledged that command-line option support did not imply attribute support #4 #5 #6.
- Tristan Partin endorsed the patch and proposed an optional pg_attribute_strict_flex_array macro to retain bounds checking for WordEntryPosVector1's genuine one-element array #7.
- Peter kept the original patch and added the macro, WordEntryPosVector1 annotation, and pgindent support, documenting that the attribute must only raise the global strictness level because some compilers lack it #8; Tristan confirmed that implementation matched his proposal #9.
- Peter committed both patches together without code changes as a625e153b7 and announced completion in the thread's final message #10, leaving no submitted patches outstanding.