From 4a5a5aeb95cc2ea519f6ad30527fda14ab94b97c Mon Sep 17 00:00:00 2001 From: Daniel Arndt Date: Wed, 19 Jun 2024 17:58:12 -0400 Subject: [PATCH] Workaround icpc warnings for missing return types Co-authored-by: Nathan Ellingwood --- .../__p2642_bits/layout_padded.hpp | 22 +++++++++---------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/include/experimental/__p2642_bits/layout_padded.hpp b/include/experimental/__p2642_bits/layout_padded.hpp index 1291c4d7..e5f7bee4 100644 --- a/include/experimental/__p2642_bits/layout_padded.hpp +++ b/include/experimental/__p2642_bits/layout_padded.hpp @@ -59,8 +59,8 @@ MDSPAN_INLINE_FUNCTION constexpr size_t get_actual_static_padding_value() { } else { return dynamic_extent; } - // Missing return statement warning from NVCC -#ifdef __NVCC__ + // Missing return statement warning from NVCC and ICC +#if defined(__NVCC__) || defined(__INTEL_COMPILER) return 0; #endif } @@ -105,9 +105,9 @@ struct padded_extent { } else { return init_padding(exts, padding_value); } - // Missing return statement warning from NVCC -#ifdef __NVCC__ - return {}; + // Missing return statement warning from NVCC and ICC +#if defined(__NVCC__) || defined(__INTEL_COMPILER) + return {}; #endif } @@ -120,9 +120,9 @@ struct padded_extent { } else { return {}; } - // Missing return statement warning from NVCC -#ifdef __NVCC__ - return {}; + // Missing return statement warning from NVCC and ICC +#if defined(__NVCC__) || defined(__INTEL_COMPILER) + return {}; #endif } @@ -135,9 +135,9 @@ struct padded_extent { } else { return {}; } - // Missing return statement warning from NVCC -#ifdef __NVCC__ - return {}; + // Missing return statement warning from NVCC and ICC +#if defined(__NVCC__) || defined(__INTEL_COMPILER) + return {}; #endif } };