Conversation
…ad of change to int16 (maybe)
MSVC #define private public incompatibility (tests/db/index/CMakeLists.txt): Excluded 4 tests on MSVC (mmap_store_test, mem_store_test, inverted_indexer_util_test, segment_test) because MSVC encodes access specifiers in mangled names, making the #define private public hack fundamentally incompatible.
CMakeLists.txt
Outdated
| add_compile_options(/wd4245 /wd4334 /wd4702 /wd4305) | ||
|
|
||
| set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Werror=return-type") | ||
| set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -Werror=return-type") | ||
| # //warning C4334: '<<': result of 32-bit shift implicitly converted to 64 bits (was 64-bit shift intended?) | ||
| # keeps |= (1 << k); | ||
| add_compile_options(/wd4334) | ||
| ###### | ||
|
|
There was a problem hiding this comment.
/wd4334 suppressed twice
Warning C4334 ("result of 32-bit shift implicitly converted to 64 bits") is already listed in the combined add_compile_options(/wd4245 /wd4334 /wd4702 /wd4305) line above, and then suppressed a second time individually. The duplicate is harmless but indicates a copy-paste oversight.
| add_compile_options(/wd4245 /wd4334 /wd4702 /wd4305) | |
| set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Werror=return-type") | |
| set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -Werror=return-type") | |
| # //warning C4334: '<<': result of 32-bit shift implicitly converted to 64 bits (was 64-bit shift intended?) | |
| # keeps |= (1 << k); | |
| add_compile_options(/wd4334) | |
| ###### | |
| add_compile_options(/wd4245 /wd4702 /wd4305) | |
| # warning C4334: '<<': result of 32-bit shift implicitly converted to 64 bits (was 64-bit shift intended?) | |
| # keeps |= (1 << k); | |
| add_compile_options(/wd4334) |
| add_compile_options(/wd4146) # unary minus operator applied to unsigned type #usage: uint32_t seg_id_{-1U}; | ||
| add_compile_options(/wd4310) # warning C4310: cast truncates constant value |
There was a problem hiding this comment.
Broad narrowing-conversion warnings suppressed without fix
/wd4267 (conversion from size_t to a smaller type) and /wd4244 (general type narrowing) are silently disabled with a comment acknowledging they need to be resolved. These two warnings regularly surface real runtime bugs (e.g., size_t → int truncation on 64-bit data, unintended float→int narrowing). Leaving them suppressed while the PR is merged makes it easy for future changes to introduce silent truncation bugs that are never caught.
Consider replacing the blanket suppression with targeted #pragma warning(suppress: ...) at the specific call sites that are genuinely safe, rather than disabling them project-wide.
| namespace core { | ||
|
|
There was a problem hiding this comment.
key_t type alias defined in two headers
using key_t = uint64_t is introduced here inside namespace zvec::core, and an identical alias is also added to src/core/utility/sparse_utility.h (line 27) in the same namespace. Any translation unit that includes both headers will have a duplicate declaration. While C++ allows re-declaring a type alias to the same type, this duplication is fragile — a future change to one without the other creates a subtle mismatch. The alias should live in a single shared header (e.g. a types.h in src/core) and be included by both files.
… 0xFFFFFFFFFFFFFFFF.
…m a non-owning thread, which is undefined behavior caught by MSVC's debug assertions
…r, may use other way
gtest-all.obj : warning LNK4197: export '??_7TestSuite@testing@@6b@' specified multiple times; using first specification [C:\Users\Administrator\Desktop\workspace\zvec\build_vs2022\thirdparty\googletest\googletest-1.10.0\googletest\gtest.vcxproj] gtest-all.obj : warning LNK4197: export '??_7AssertionException@testing@@6b@' specified multiple times; using first specification [C:\Users\Administrator\Desktop\workspace\zvec\build_vs2022\thirdparty\googletest\googletest-1.10.0\googletest\gtest.vcxproj] gtest-all.obj : warning LNK4197: export '??_7UnitTest@testing@@6b@' specified multiple times; using first specification [C:\Users\Administrator\Desktop\workspace\zvec\build_vs2022\thirdparty\googletest\googletest-1.10.0\googletest\gtest.vcxproj] gtest-all.obj : warning LNK4197: export '??_7ScopedFakeTestPartResultReporter@testing@@6b@' specified multiple times; using first specification [C:\Users\Administrator\Desktop\workspace\zvec\build_vs2022\thirdparty\googletest\googletest-1.10.0\googletest\gtest.vcxproj] gtest-all.obj : warning LNK4197: export '??_7UnitTestImpl@
ffc9d32 to
5c61212
Compare
# Conflicts: # cmake/bazel.cmake # src/ailego/math/inner_product_matrix_fp16.cc # src/ailego/math/inner_product_matrix_fp32.cc # src/ailego/math/mips_euclidean_distance_matrix_fp32.cc
|
Update: just got it building on Win Server 2025 / VS2022 and the UTs are passing.
|
WIP