From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 7857) id D439E38582A1; Thu, 23 Feb 2023 14:04:12 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org D439E38582A1 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1677161052; bh=Rck5IPRhJlF6E1nCVBC5M66SUxlqXjFNOTtWyFLYU0Y=; h=From:To:Subject:Date:From; b=hNK+JkPogNtcvCE8sWQjgn9QUJavA4Ae0lK7AEhIspedbybu3R6MBs5BqtV8R5Y/Q Ly7uGdMbG0WulaldrWRfQA4qRNB1MYDb7xTtsYVWXtkv2jCfK+VCkf8awWLw0LJ6Up 9+evo2ijdnsYMCxuaOTO7Pkwmn7K5uejdVfb+IdY= MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="utf-8" From: Matthias Kretz To: gcc-cvs@gcc.gnu.org, libstdc++-cvs@gcc.gnu.org Subject: [gcc r13-6301] libstdc++: Fix -Wsign-compare issue X-Act-Checkin: gcc X-Git-Author: Matthias Kretz X-Git-Refname: refs/heads/master X-Git-Oldrev: fa37ac2b59ed1c379b35dbf9bd58f7849f9fd5b5 X-Git-Newrev: ffa39f7120f6e83a567d7a83ff4437f6b41036ea Message-Id: <20230223140412.D439E38582A1@sourceware.org> Date: Thu, 23 Feb 2023 14:04:12 +0000 (GMT) List-Id: https://gcc.gnu.org/g:ffa39f7120f6e83a567d7a83ff4437f6b41036ea commit r13-6301-gffa39f7120f6e83a567d7a83ff4437f6b41036ea Author: Matthias Kretz Date: Tue Feb 21 10:31:55 2023 +0100 libstdc++: Fix -Wsign-compare issue Signed-off-by: Matthias Kretz libstdc++-v3/ChangeLog: * include/experimental/bits/simd_builtin.h (_S_set): Compare as int. The actual range of these indexes is very small. Diff: --- libstdc++-v3/include/experimental/bits/simd_builtin.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libstdc++-v3/include/experimental/bits/simd_builtin.h b/libstdc++-v3/include/experimental/bits/simd_builtin.h index 792439a81bf..9736db65e01 100644 --- a/libstdc++-v3/include/experimental/bits/simd_builtin.h +++ b/libstdc++-v3/include/experimental/bits/simd_builtin.h @@ -2870,7 +2870,7 @@ template __k = __generate_from_n_evaluations<_Np, __vector_type_t<_Tp, _Np>>( [&](auto __j) _GLIBCXX_SIMD_ALWAYS_INLINE_LAMBDA { - if (__i == __j) + if (__i == static_cast(__j)) return _Tp(-__x); else return __k[+__j];