model-writtenrun 2038 - may be wrong, links go to the source messages. Commit-by-commit LLM analysis is in the Commits dialog.
- The thread began with Masahiko Sawada's announcement of a pg_logicalinspect crash fix that validated snapshot filenames before restoring snapshots and added regression coverage #1.
- David Rowley reported that the new parse_snapshot_filename() could trigger a missing-return warning when a compiler did not recognize ereport(ERROR) as nonreturning, and supplied a dummy-return fix #2.
- While Masahiko sought a way to reproduce the warning with GCC, Tom Lane experimented with disabling pg_unreachable(); David confirmed that this exposed the warning with GCC and identified MSVC as the original affected compiler #3 #4 #5 #7.
- Masahiko committed David's fix with the return value spelled InvalidXLogRecPtr instead of zero in 9e088f7dd8, then confirmed that he had reproduced the warning and pushed the fix #8.
- Peter Eisentraut questioned why existing MSVC unreachable support was insufficient; David traced the issue to ereport_domain() storing the error level in a temporary variable, which prevented MSVC from proving that the unreachable branch was taken #9 #10.
- Tom revived the discussion in July with an additional constant boolean intended to preserve that proof, but David found it ineffective and instead demonstrated a C11 _Generic technique for detecting constant expressions #11 #12.
- Tom suggested requiring C11 specifically for MSVC builds, and David supplied a new infrastructure patch after finding that the minimum supported Visual Studio version supported C11; his warning test passed with C11 explicitly enabled #13 #14.
- Following Tom's suggestion to share constant detection, David revised the patch to provide pg_builtin_constant() in src/include/c.h and enable C11 through Meson for MSVC #15 #16. The local warning fix had landed, but this broader work remained uncommitted in the supplied thread, with a temporary test edit still present and other constant-detection callers and expression compatibility left to investigate #16.