aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordfyz <dfyz@yandex-team.com>2022-10-08 18:31:37 +0300
committerdfyz <dfyz@yandex-team.com>2022-10-08 18:31:37 +0300
commit35b65c84fba4bca4976ace7ae00a4e4bef6e1ca8 (patch)
treec16f66510adc9ffc4df86acc26ebe934b09daf19
parent965dbb360c624c2f714450a1e1afbc1e7b07bf34 (diff)
downloadydb-35b65c84fba4bca4976ace7ae00a4e4bef6e1ca8.tar.gz
Fix a warning when compiling util/ with nvcc 10.x
nvcc10.1 is unable to compile `[[clang::reinitializes]]` and issues warning as follows: ``` util/generic/ptr.h(194): warning: attribute namespace "clang" is unrecognized util/generic/ptr.h(201): warning: attribute namespace "clang" is unrecognized [...] ``` nvcc11 compiles this code without any warnings. This PRs disable `[[clang::reinitialized]]` when compiling with nvcc10.
-rw-r--r--util/system/compiler.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/util/system/compiler.h b/util/system/compiler.h
index d205446597..e7aa4eac38 100644
--- a/util/system/compiler.h
+++ b/util/system/compiler.h
@@ -636,7 +636,7 @@ _YandexAbort();
} while (0)
#endif
-#if defined(__clang__)
+#if defined(__clang__) && Y_CUDA_AT_LEAST(11, 0)
#define Y_REINITIALIZES_OBJECT [[clang::reinitializes]]
#else
#define Y_REINITIALIZES_OBJECT