Skip to content

Commit 1de80c9

Browse files
committed
One more warning to silence
1 parent 54753b2 commit 1de80c9

1 file changed

Lines changed: 8 additions & 1 deletion

File tree

dependencies/O2CompileFlags.cmake

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,8 +94,15 @@ endif()
9494
# flat objects bitwise BY DESIGN, and its types delete their copy constructors
9595
# precisely so nobody copies them the C++ way, which is what
9696
# -Wnontrivial-memcall objects to.
97+
#
98+
# implicit-const-int-float-conversion joined the list on 2026-09-05, from
99+
# GPU/TPCFastTransformation/test/testMultivarPolynomials.cxx: RAND_MAX is
100+
# 2147483647 and `RAND_MAX / (maxVal - minVal)` converts it to float, which
101+
# cannot represent it exactly. That is the ordinary idiom for scaling rand()
102+
# and the lost bit does not matter to a test's random input, so warn rather
103+
# than fail. It reddened every macOS-arm alidist rebuild until covered.
97104
if(CMAKE_CXX_COMPILER_ID MATCHES "Clang")
98-
set(O2_NEW_COMPILER_WARNINGS_NO_ERROR "nontrivial-memcall;deprecated-literal-operator;final-dtor-non-final-class;nonnull")
105+
set(O2_NEW_COMPILER_WARNINGS_NO_ERROR "nontrivial-memcall;deprecated-literal-operator;final-dtor-non-final-class;nonnull;implicit-const-int-float-conversion")
99106
o2_build_warning_flags(PREFIX "-Wno-error="
100107
OUTPUTVARNAME O2_NEW_COMPILER_NO_ERROR_FLAGS
101108
WARNINGS ${O2_NEW_COMPILER_WARNINGS_NO_ERROR})

0 commit comments

Comments
 (0)