File tree Expand file tree Collapse file tree 1 file changed +7
-0
lines changed
sycl/include/sycl/ext/oneapi/experimental Expand file tree Collapse file tree 1 file changed +7
-0
lines changed Original file line number Diff line number Diff line change @@ -355,6 +355,12 @@ static constexpr ext::oneapi::experimental::architecture
355
355
// target name is specified via "-fsycl-targets", the associated invocation of
356
356
// the device compiler will set this variable to false, and that will trigger
357
357
// an error for code that uses "if_architecture_is".
358
+ #pragma warning(push)
359
+ // By some reason the following diagnostic is emitted which breaks -Werror (/WX)
360
+ // build. Preprocessed code looks like (0 == 1) || (0 == 1) || ..., so it looks
361
+ // like a bug in the MSVC compiler, hence disabling it.
362
+ // (<non-zero constant> || <non-zero constant>) is always a non-zero constant. Did you intend to use the bitwise-and operator?
363
+ #pragma warning(disable: 6285)
358
364
static constexpr bool is_allowable_aot_mode =
359
365
(__SYCL_TARGET_INTEL_X86_64__ == 1 ) ||
360
366
(__SYCL_TARGET_INTEL_GPU_BDW__ == 1 ) ||
@@ -443,6 +449,7 @@ static constexpr bool is_allowable_aot_mode =
443
449
(__SYCL_TARGET_AMD_GPU_GFX1151__ == 1 ) ||
444
450
(__SYCL_TARGET_AMD_GPU_GFX1200__ == 1 ) ||
445
451
(__SYCL_TARGET_AMD_GPU_GFX1201__ == 1 );
452
+ #pragma warning(pop)
446
453
447
454
constexpr static std::optional<ext::oneapi::experimental::architecture>
448
455
get_current_architecture_aot () {
You can’t perform that action at this time.
0 commit comments