diff --git a/cpp/cmake_modules/SetupCxxFlags.cmake b/cpp/cmake_modules/SetupCxxFlags.cmake index c9e6c36dc4838..f12bcae9d37ec 100644 --- a/cpp/cmake_modules/SetupCxxFlags.cmake +++ b/cpp/cmake_modules/SetupCxxFlags.cmake @@ -311,11 +311,13 @@ if("${BUILD_WARNING_LEVEL}" STREQUAL "CHECKIN") set(CXX_COMMON_FLAGS "${CXX_COMMON_FLAGS} -Wno-unused-parameter") set(CXX_COMMON_FLAGS "${CXX_COMMON_FLAGS} -Wno-constant-logical-operand") set(CXX_COMMON_FLAGS "${CXX_COMMON_FLAGS} -Wno-return-stack-address") + set(CXX_COMMON_FLAGS "${CXX_COMMON_FLAGS} -Wdate-time") elseif(CMAKE_CXX_COMPILER_ID STREQUAL "GNU") set(CXX_COMMON_FLAGS "${CXX_COMMON_FLAGS} -Wall") set(CXX_COMMON_FLAGS "${CXX_COMMON_FLAGS} -Wno-conversion") set(CXX_COMMON_FLAGS "${CXX_COMMON_FLAGS} -Wno-sign-conversion") set(CXX_COMMON_FLAGS "${CXX_COMMON_FLAGS} -Wunused-result") + set(CXX_COMMON_FLAGS "${CXX_COMMON_FLAGS} -Wdate-time") elseif(CMAKE_CXX_COMPILER_ID STREQUAL "Intel") if(WIN32) set(CXX_COMMON_FLAGS "${CXX_COMMON_FLAGS} /Wall") diff --git a/cpp/src/arrow/vendored/pcg/README.md b/cpp/src/arrow/vendored/pcg/README.md index bf72ea8973e36..b58504f3b373e 100644 --- a/cpp/src/arrow/vendored/pcg/README.md +++ b/cpp/src/arrow/vendored/pcg/README.md @@ -24,3 +24,5 @@ Sources are taken from git changeset ffd522e7188bef30a00c74dc7eb9de5faff90092 Changes: - enclosed in `arrow_vendored` namespace +- remove `struct arbitrary_seed` definition because of https://github.com/apache/arrow/issues/35596 + diff --git a/cpp/src/arrow/vendored/pcg/pcg_extras.hpp b/cpp/src/arrow/vendored/pcg/pcg_extras.hpp index 760867e1ebead..36576cfa91d8c 100644 --- a/cpp/src/arrow/vendored/pcg/pcg_extras.hpp +++ b/cpp/src/arrow/vendored/pcg/pcg_extras.hpp @@ -612,27 +612,6 @@ class seed_seq_from { } }; -/* - * Sometimes you might want a distinct seed based on when the program - * was compiled. That way, a particular instance of the program will - * behave the same way, but when recompiled it'll produce a different - * value. - */ - -template -struct static_arbitrary_seed { -private: - static constexpr IntType fnv(IntType hash, const char* pos) { - return *pos == '\0' - ? hash - : fnv((hash * IntType(16777619U)) ^ *pos, (pos+1)); - } - -public: - static constexpr IntType value = fnv(IntType(2166136261U ^ sizeof(IntType)), - __DATE__ __TIME__ __FILE__); -}; - // Sometimes, when debugging or testing, it's handy to be able print the name // of a (in human-readable form). This code allows the idiom: //