From 84660f36de124ad5a6480a945ae8968f8381c3a3 Mon Sep 17 00:00:00 2001 From: Sergei Semin Date: Tue, 17 Aug 2021 12:17:47 +0300 Subject: [PATCH 1/3] add -Wno-reserved-identifier in necessary places --- utils/corrector_utf8/CMakeLists.txt | 1 + utils/iotest/CMakeLists.txt | 2 ++ utils/zookeeper-cli/CMakeLists.txt | 1 + 3 files changed, 4 insertions(+) diff --git a/utils/corrector_utf8/CMakeLists.txt b/utils/corrector_utf8/CMakeLists.txt index 4784fd43e2d..a426815bf99 100644 --- a/utils/corrector_utf8/CMakeLists.txt +++ b/utils/corrector_utf8/CMakeLists.txt @@ -1,2 +1,3 @@ add_executable(corrector_utf8 corrector_utf8.cpp) target_link_libraries(corrector_utf8 PRIVATE clickhouse_common_io) +target_no_warning(corrector_utf8 reserved-identifier) diff --git a/utils/iotest/CMakeLists.txt b/utils/iotest/CMakeLists.txt index 8f141b178f0..66e2b982104 100644 --- a/utils/iotest/CMakeLists.txt +++ b/utils/iotest/CMakeLists.txt @@ -4,6 +4,8 @@ target_link_libraries (iotest PRIVATE clickhouse_common_io) add_executable (iotest_nonblock iotest_nonblock.cpp ${SRCS}) target_link_libraries (iotest_nonblock PRIVATE clickhouse_common_io) +target_no_warning(iotest_nonblock reserved-identifier) add_executable (iotest_aio iotest_aio.cpp ${SRCS}) target_link_libraries (iotest_aio PRIVATE clickhouse_common_io) +target_no_warning(iotest_aio reserved-identifier) diff --git a/utils/zookeeper-cli/CMakeLists.txt b/utils/zookeeper-cli/CMakeLists.txt index 2199a1b38ff..90794dcceb5 100644 --- a/utils/zookeeper-cli/CMakeLists.txt +++ b/utils/zookeeper-cli/CMakeLists.txt @@ -1,2 +1,3 @@ add_executable(clickhouse-zookeeper-cli zookeeper-cli.cpp) target_link_libraries(clickhouse-zookeeper-cli PRIVATE clickhouse_common_zookeeper) +target_no_warning(clickhouse-zookeeper-cli reserved-identifier) From 495c359889f22adb6a2e62b0bd88c964f12c1348 Mon Sep 17 00:00:00 2001 From: Sergei Semin Date: Tue, 17 Aug 2021 22:58:29 +0300 Subject: [PATCH 2/3] Revert "add -Wno-reserved-identifier in necessary places" This reverts commit 84660f36de124ad5a6480a945ae8968f8381c3a3. --- utils/corrector_utf8/CMakeLists.txt | 1 - utils/iotest/CMakeLists.txt | 2 -- utils/zookeeper-cli/CMakeLists.txt | 1 - 3 files changed, 4 deletions(-) diff --git a/utils/corrector_utf8/CMakeLists.txt b/utils/corrector_utf8/CMakeLists.txt index a426815bf99..4784fd43e2d 100644 --- a/utils/corrector_utf8/CMakeLists.txt +++ b/utils/corrector_utf8/CMakeLists.txt @@ -1,3 +1,2 @@ add_executable(corrector_utf8 corrector_utf8.cpp) target_link_libraries(corrector_utf8 PRIVATE clickhouse_common_io) -target_no_warning(corrector_utf8 reserved-identifier) diff --git a/utils/iotest/CMakeLists.txt b/utils/iotest/CMakeLists.txt index 66e2b982104..8f141b178f0 100644 --- a/utils/iotest/CMakeLists.txt +++ b/utils/iotest/CMakeLists.txt @@ -4,8 +4,6 @@ target_link_libraries (iotest PRIVATE clickhouse_common_io) add_executable (iotest_nonblock iotest_nonblock.cpp ${SRCS}) target_link_libraries (iotest_nonblock PRIVATE clickhouse_common_io) -target_no_warning(iotest_nonblock reserved-identifier) add_executable (iotest_aio iotest_aio.cpp ${SRCS}) target_link_libraries (iotest_aio PRIVATE clickhouse_common_io) -target_no_warning(iotest_aio reserved-identifier) diff --git a/utils/zookeeper-cli/CMakeLists.txt b/utils/zookeeper-cli/CMakeLists.txt index 90794dcceb5..2199a1b38ff 100644 --- a/utils/zookeeper-cli/CMakeLists.txt +++ b/utils/zookeeper-cli/CMakeLists.txt @@ -1,3 +1,2 @@ add_executable(clickhouse-zookeeper-cli zookeeper-cli.cpp) target_link_libraries(clickhouse-zookeeper-cli PRIVATE clickhouse_common_zookeeper) -target_no_warning(clickhouse-zookeeper-cli reserved-identifier) From da3f5612ae5677bdf0523ac7ba06ed5c1309164a Mon Sep 17 00:00:00 2001 From: Sergei Semin Date: Tue, 17 Aug 2021 23:08:17 +0300 Subject: [PATCH 3/3] rename _Bits -> _bits --- base/common/wide_integer_impl.h | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/base/common/wide_integer_impl.h b/base/common/wide_integer_impl.h index d2ef8b22d65..27efe18eedd 100644 --- a/base/common/wide_integer_impl.h +++ b/base/common/wide_integer_impl.h @@ -152,7 +152,7 @@ namespace wide template struct integer::_impl { - static constexpr size_t _Bits = Bits; + static constexpr size_t _bits = Bits; static constexpr const unsigned byte_count = Bits / 8; static constexpr const unsigned item_count = byte_count / sizeof(base_type); static constexpr const unsigned base_bits = sizeof(base_type) * 8; @@ -614,8 +614,8 @@ public: else { static_assert(IsWideInteger::value); - return std::common_type_t, integer>::_impl::operator_plus( - integer(lhs), rhs); + return std::common_type_t, integer>::_impl::operator_plus( + integer(lhs), rhs); } } @@ -632,8 +632,8 @@ public: else { static_assert(IsWideInteger::value); - return std::common_type_t, integer>::_impl::operator_minus( - integer(lhs), rhs); + return std::common_type_t, integer>::_impl::operator_minus( + integer(lhs), rhs); } } @@ -857,7 +857,7 @@ public: else { static_assert(IsWideInteger::value); - return std::common_type_t, integer>::operator_slash(T(lhs), rhs); + return std::common_type_t, integer>::operator_slash(T(lhs), rhs); } } @@ -877,7 +877,7 @@ public: else { static_assert(IsWideInteger::value); - return std::common_type_t, integer>::operator_percent(T(lhs), rhs); + return std::common_type_t, integer>::operator_percent(T(lhs), rhs); } }