Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 17 additions & 0 deletions presto-native-execution/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,23 @@ set(DISABLED_WARNINGS
-Wno-deprecated-declarations \
-Wno-restrict")

# Disable -Wstringop-overflow to avoid a false positive in the following
# compiler versions. See https://gcc.gnu.org/bugzilla/show_bug.cgi?id=117983
#
# NOTE: Typically, this is disabled using a VELOX_SUPPRESS_STRINGOP guard within
# the code; but that doesn't apply to 3rd-party libraries, so we need to disable
# it globally for now.
Comment on lines +44 to +46

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧹 Nitpick (assertive)

Clarify the comment to reflect intent and scope trade-offs.

If you keep a project-wide suppression, explicitly call out the risk, and mark a TODO to scope it down later.

-# NOTE: Typically, this is disabled using a VELOX_SUPPRESS_STRINGOP guard within
-# the code; but that doesn't apply to 3rd-party libraries, so we need to disable
-# it globally for now.
+# NOTE: VELOX_SUPPRESS_STRINGOP guards apply within Velox sources only; they do not
+# cover third-party targets. As a stopgap, we apply a project-wide suppression here.
+# TODO: Replace with a target-scoped suppression for the affected 3rd-party target(s).
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
# NOTE: Typically, this is disabled using a VELOX_SUPPRESS_STRINGOP guard within
# the code; but that doesn't apply to 3rd-party libraries, so we need to disable
# it globally for now.
# NOTE: VELOX_SUPPRESS_STRINGOP guards apply within Velox sources only; they do not
# cover third-party targets. As a stopgap, we apply a project-wide suppression here.
# TODO: Replace with a target-scoped suppression for the affected 3rd-party target(s).
🤖 Prompt for AI Agents
In presto-native-execution/CMakeLists.txt around lines 44 to 46, the current
comment explains disabling a string operation guard globally but doesn't call
out the associated risk or future work; update the comment to explicitly state
this is a project-wide suppression, enumerate the risk (e.g., affects all
3rd-party libraries and may hide bugs or performance issues), and add a TODO
noting that the suppression should be scoped to specific targets or dependencies
later with steps to revisit and tighten the guard.

if("GNU" STREQUAL "${CMAKE_CXX_COMPILER_ID}"
AND ((CMAKE_CXX_COMPILER_VERSION VERSION_GREATER_EQUAL 12
AND CMAKE_CXX_COMPILER_VERSION VERSION_LESS 12.5)
OR (CMAKE_CXX_COMPILER_VERSION VERSION_GREATER_EQUAL 13
AND CMAKE_CXX_COMPILER_VERSION VERSION_LESS 13.4)
OR (CMAKE_CXX_COMPILER_VERSION VERSION_GREATER_EQUAL 14
AND CMAKE_CXX_COMPILER_VERSION VERSION_LESS 14.3)
))
set(DISABLED_WARNINGS "${DISABLED_WARNINGS} -Wno-stringop-overflow")
endif()

# Important warnings that must be explicitly enabled.
set(ENABLE_WARNINGS "-Wreorder")

Expand Down
Loading