diff options
author | dfyz <dfyz@yandex-team.com> | 2022-10-08 18:31:37 +0300 |
---|---|---|
committer | dfyz <dfyz@yandex-team.com> | 2022-10-08 18:31:37 +0300 |
commit | 35b65c84fba4bca4976ace7ae00a4e4bef6e1ca8 (patch) | |
tree | c16f66510adc9ffc4df86acc26ebe934b09daf19 | |
parent | 965dbb360c624c2f714450a1e1afbc1e7b07bf34 (diff) | |
download | ydb-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.h | 2 |
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 |