public inbox for libstdc++-cvs@sourceware.org
help / color / mirror / Atom feed
* [gcc r13-6301] libstdc++: Fix -Wsign-compare issue
@ 2023-02-23 14:04 Matthias Kretz
0 siblings, 0 replies; only message in thread
From: Matthias Kretz @ 2023-02-23 14:04 UTC (permalink / raw)
To: gcc-cvs, libstdc++-cvs
https://gcc.gnu.org/g:ffa39f7120f6e83a567d7a83ff4437f6b41036ea
commit r13-6301-gffa39f7120f6e83a567d7a83ff4437f6b41036ea
Author: Matthias Kretz <m.kretz@gsi.de>
Date: Tue Feb 21 10:31:55 2023 +0100
libstdc++: Fix -Wsign-compare issue
Signed-off-by: Matthias Kretz <m.kretz@gsi.de>
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 <typename _Abi, typename>
__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<int>(__j))
return _Tp(-__x);
else
return __k[+__j];
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2023-02-23 14:04 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-02-23 14:04 [gcc r13-6301] libstdc++: Fix -Wsign-compare issue Matthias Kretz
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).