aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--build_settings.cmake7
-rw-r--r--searchlib/src/vespa/searchlib/expression/simple_interpolate.cpp1
2 files changed, 8 insertions, 0 deletions
diff --git a/build_settings.cmake b/build_settings.cmake
index 220593cfd8f..e06a7eba5f4 100644
--- a/build_settings.cmake
+++ b/build_settings.cmake
@@ -47,6 +47,13 @@ if (VESPA_USE_SANITIZER)
set(C_WARN_OPTS "${C_WARN_OPTS} -Wno-tsan")
endif()
endif()
+if(CMAKE_CXX_COMPILER_ID STREQUAL "GNU" AND CMAKE_CXX_COMPILER_VERSION VERSION_GREATER_EQUAL 12.0 AND NOT CMAKE_CXX_COMPILER_VERSION VERSION_GREATER_EQUAL 13.0)
+ if(VESPA_OS_DISTRO_COMBINED STREQUAL "debian 12" OR VESPA_OS_DISTRO_COMBINED STREQUAL "ubuntu 22.04")
+ # Turn off restrict warnings when compiling with gcc 12 on Debian 12 or
+ # Ubuntu 22.04
+ set(C_WARN_OPTS "${C_WARN_OPTS} -Wno-restrict")
+ endif()
+endif()
if(CMAKE_CXX_COMPILER_ID STREQUAL "GNU" AND CMAKE_CXX_COMPILER_VERSION VERSION_GREATER_EQUAL 14.0)
# Turn off maybe uninitialized warning when compiling with
# gcc 14 or newer.
diff --git a/searchlib/src/vespa/searchlib/expression/simple_interpolate.cpp b/searchlib/src/vespa/searchlib/expression/simple_interpolate.cpp
index a3f8d55dec1..28ded485f83 100644
--- a/searchlib/src/vespa/searchlib/expression/simple_interpolate.cpp
+++ b/searchlib/src/vespa/searchlib/expression/simple_interpolate.cpp
@@ -1,6 +1,7 @@
// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
#include "simple_interpolate.h"
+#include <cstddef>
namespace search::expression {