Merge pull request #15168 from roberth/fix-protocol-addToStore-version-comparisons

Add -Werror=c99-designator and fix brace elision warnings
This commit is contained in:
John Ericson
2026-02-06 22:11:36 +00:00
committed by GitHub

View File

@@ -40,6 +40,11 @@ do_pch = cxx.get_id() == 'clang'
# instantiations in libutil and libstore.
if cxx.get_id() == 'clang'
add_project_arguments('-fpch-instantiate-templates', language : 'cpp')
# Catch brace elision bugs: when WorkerProto::Version changed from `unsigned int`
# to `struct { unsigned int major; uint8_t minor; }`, `.version = 16` silently
# became `.version = {16, 0}` instead of failing, breaking protocol compatibility
# in a subtle way
add_project_arguments('-Werror=c99-designator', language : 'cpp')
endif
# Detect if we're using libstdc++ (GCC's standard library)